skydialv0.4.1 Svelte
  1. skydial
  2. Frameworks
  3. Svelte

Svelte

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.

A real 3D celestial website widget loads here. Positions, illumination and rotation are computed from the selected moment. Exact date and time controls remain available without WebGL.

The code for what is on screen

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