Inputs
Icon crossfade switch
Icon crossfade switch: A toggle switch whose thumb icon fades and scales into a different icon as the switch flips between off and on.
Using Icon crossfade switch
Icon crossfade switch 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 | Dark mode | Up to 40 characters |
on | boolean | false | No additional limit in the metadata. |
iconStyle | select | sun-moon | Options: sun-moon, check-cross, dot-ring |
accent | color | #7C5CFF | No additional limit in the metadata. |
Which frameworks are available for Icon crossfade switch?
Icon crossfade switch 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 Icon crossfade switch depend on?
The React metadata lists these npm dependencies beyond React: motion.
What accessibility details are visible in Icon crossfade switch?
The React source for Icon crossfade switch includes: attributes and handlers (aria-checked, aria-hidden, aria-label); explicit roles (switch). These are source observations. Verify accessible names, focus order and keyboard behavior in the composed page.
How does Icon crossfade switch handle reduced motion?
Icon crossfade switch reads the motion preference in its React source through useReducedMotion(). Preference-dependent expressions in index.tsx: fade: reduce ? { duration: 0 } : FADE; slide: reduce ? { duration: 0 } : SLIDE. Check the full implementation, shared styles and selected port with reduced motion enabled; these observations do not establish that every animation stops.