Buttons
Press plate toggle
Press plate toggle: A bare two-state button whose filled plate cross-fades in behind its content when pressed, with the state readable and settable from outside the button itself.
Using Press plate toggle
Press plate toggle uses the card 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 |
|---|---|---|---|
startPressed | boolean | false | No additional limit in the metadata. |
accent | color | #38BDF8 | No additional limit in the metadata. |
radius | number | 8 | From 0 to 18; step 1 |
fadeMs | number | 160 | From 0 to 500; step 20 |
showControls | boolean | true | No additional limit in the metadata. |
Which frameworks are available for Press plate toggle?
Press plate 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 Press plate toggle depend on?
The React metadata lists these npm dependencies beyond React: motion, clsx.
What accessibility details are visible in Press plate toggle?
The React source for Press plate toggle includes: attributes and handlers (aria-hidden, aria-label, aria-pressed). These are source observations. Verify accessible names, focus order and keyboard behavior in the composed page.
How does Press plate toggle handle reduced motion?
Press plate toggle reads the motion preference in its React source through useReducedMotion(). Preference-dependent expressions in index.tsx: reduceMotion ? 0 : fadeMs; reduceMotion ? undefined : { scale: 0.94 }. Check the full implementation, shared styles and selected port with reduced motion enabled; these observations do not establish that every animation stops.