Buttons
Pressable icon toggle
Pressable icon toggle: A button with an icon and label that stays visually pressed once clicked, for a standalone on or off action such as muting or bolding.
Using Pressable icon toggle
Pressable icon 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 |
|---|---|---|---|
label | text | Bold | Up to 20 characters |
pressed | boolean | false | No additional limit in the metadata. |
variant | select | outline | Options: default, outline |
Which frameworks are available for Pressable icon toggle?
Pressable icon 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 Pressable icon toggle depend on?
The React metadata lists these npm dependencies beyond React: motion, clsx.
What accessibility details are visible in Pressable icon toggle?
The React source for Pressable icon toggle includes: 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 Pressable icon toggle handle reduced motion?
Pressable icon toggle reads the motion preference in its React source through useReducedMotion(). Preference-dependent expressions in index.tsx: disabled || reduceMotion ? undefined : { scale: 0.96 }; transition: reduceMotion ? "none" : "background-color 140ms ease, color 140ms ease". Check the full implementation, shared styles and selected port with reduced motion enabled; these observations do not establish that every animation stops.