# Vanilla JavaScript

*skydial · Frameworks*

The DOM entry owns only the element you supply. It returns update and destroy methods; destroying is idempotent. A container cannot be mounted twice until its previous instance is destroyed. Keep this API on the client, after the element exists.

```tsx
import { mountCelestial } from 'skydial/dom'
import 'skydial/style.css'

const widget = mountCelestial(element, 'widget', { kind: 'earth', size: 'small' })
widget.update({ kind: 'moon', size: 'medium' })
// When removing the host element:
widget.destroy()
```

Update replaces the props object while retaining unchanged component state. Use controlled date values to change the moment after mount; defaultDate only establishes initial state. Renderer peers are required here too. For direct Three.js scenes without React, use the separate three entry.

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