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.
| Control | Type | Default | Preview limits |
|---|---|---|---|
pressed | boolean | false | No additional limit in the metadata. |
size | select | md | Options: sm, md, lg |
disabled | boolean | false | No additional limit in the metadata. |
accentColor | color | #9BE15D | No 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.