Skip to content
Menu

Inputs

Latching square toggle

Latching square toggle: A compact square icon button that latches between a faint outlined off state and a solid accent-filled pressed state.

Using Latching square toggle

Latching square toggle uses the inline preview frame with a light/dark theme setting.

Customize the preview

These controls are passed to the demo. Defaults and limits describe the preview; consult the implementation for its full prop API.

ControlTypeDefaultPreview limits
pressedbooleanfalseNo additional limit in the metadata.
sizeselectmdOptions: sm, md, lg
disabledbooleanfalseNo additional limit in the metadata.
accentColorcolor#9BE15DNo additional limit in the metadata.
Which frameworks are available for Latching square toggle?

Latching square toggle is available for React, Vue, Svelte, Astro, HTML. The live preview uses React; the source observations below apply to index.tsx. Check the selected port before relying on the same interactions.

What does Latching square toggle depend on?

The React metadata lists these npm dependencies beyond React: clsx.

What accessibility details are visible in Latching square toggle?

The React source for Latching square toggle includes: native elements (button); attributes and handlers (aria-hidden, aria-pressed). These are source observations. Verify accessible names, focus order and keyboard behavior in the composed page.

How does Latching square toggle handle reduced motion?

The source scan found no direct useReducedMotion() or matchMedia preference read in Latching square toggle's index.tsx. Check the full implementation, shared styles and selected port with reduced motion enabled; these observations do not establish that every animation stops.

Connect your agent

Related open components