# Svelte

*skydial · Frameworks*

The celestial action follows Svelte’s native element lifecycle. Supply a component kind and options. Reactive changes update the scene; removing the element destroys its mount. The action supports picker, time, widget, clock, earth, moon and orrery.

```tsx
<script>
import { celestial } from 'skydial/svelte'
import 'skydial/style.css'
let date = $state(new Date('2026-06-01T12:00:00Z'))
</script>

<div use:celestial={{ component: 'picker', options: { date, onDateChange: value => date = value } }}></div>
```

Install Svelte plus the shared visual renderer peers. The action is browser-only and is not executed during Svelte server rendering. It mounts the same React/Three.js scene used by the other adapters, so visual behavior and astronomical calculations remain consistent.

---
https://tbudin.github.io/skydial/svelte/ · skydial 0.4.1 · MIT
