# Sun moon morph toggle

https://fieldbook.lizardi.mx/components/sun-moon-morph-toggle

Category: Buttons
![Still of the Sun moon morph toggle component, a Fieldbook UI component in Buttons.](https://fieldbook.lizardi.mx/thumbs/sun-moon-morph-toggle.webp)
Preview video: https://ejpqcxcjbiyabxkx.public.blob.vercel-storage.com/previews/sun-moon-morph-toggle-d08b9af2a7.mp4 (5 s, silent)

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.

## Frameworks

react, vue, svelte, astro, html

## Preview controls

These controls are passed to the demo. Defaults and limits describe the preview; consult the implementation for its full prop API.

| Name | Type | Default | Options or constraints |
| --- | --- | --- | --- |
| 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. |

## Usage notes

Sun moon morph toggle uses the inline preview frame with a light/dark theme setting.

### 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.

## Install through MCP

Connect your client, call get_component to retrieve the implementation, then get_install_command for installation instructions. Choose a listed framework, integrate the returned source and verify it in your application.

```json
{
  "tool": "get_component",
  "arguments": {
    "slug": "sun-moon-morph-toggle",
    "framework": "react"
  }
}
```

[For agents](https://fieldbook.lizardi.mx/docs/agents)
[MCP](https://fieldbook.lizardi.mx/api/mcp)

## Related open components

- [Chevron flip tile](https://fieldbook.lizardi.mx/components/chevron-flip-tile)
- [Expanding icon pill](https://fieldbook.lizardi.mx/components/expanding-icon-pill)
- [Morphing backdrop button](https://fieldbook.lizardi.mx/components/morphing-backdrop-button)
- [Plus to cross tile](https://fieldbook.lizardi.mx/components/plus-to-cross-tile)
- [Pressable icon toggle](https://fieldbook.lizardi.mx/components/pressable-icon-toggle)
- [Slab Lift Icon Button](https://fieldbook.lizardi.mx/components/slab-lift-icon-button)
