Buttons
Sun moon morph toggle
Sun moon morph toggle: A theme toggle where a ringed sun swings its rays away and grows while a second disc slides in to bite a crescent out of it.
Using Sun moon morph toggle
Sun moon morph 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 |
|---|---|---|---|
ink | color | #F5C542 | No additional limit in the metadata. |
startDark | boolean | false | No additional limit in the metadata. |
tileSize | number | 64 | From 44 to 96; step 4 |
duration | number | 400 | From 150 to 900; step 25 |
showTile | boolean | true | No additional limit in the metadata. |
Which frameworks are available for Sun moon morph toggle?
Sun moon morph 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 Sun moon morph toggle depend on?
The React metadata lists these npm dependencies beyond React: motion.
What accessibility details are visible in Sun moon morph toggle?
The React source for Sun moon morph 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 Sun moon morph toggle handle reduced motion?
Sun moon morph toggle reads the motion preference in its React source through useReducedMotion(). Preference-dependent expressions in index.tsx: discScale: reduced ? 1 : 1 + p * (GROW - 1); occluderOpacity: reduced ? p : 1; occluderScale: reduced ? 1 : p. Check the full implementation, shared styles and selected port with reduced motion enabled; these observations do not establish that every animation stops.