## Demo: props-id
### PropsId.svelte
```svelte
$props.id() works with zero JavaScript shipped — the id is minted during SSR, no hydration required. Each instance gets its own id, so the label/for pairs never collide. Hydration reuses the server-generated value — the id you see was minted during SSR.
Deferred islands render in a separate request; Mochi namespaces their ids with the island's own id (via render's idPrefix) so they cannot collide with ids already on the page.
With
Client-only islands are never server-rendered, so each Static component (no hydration)
Two hydrated islands, two ids
Server island
Server island that also hydrates
mochi:defer mochi:hydrate the namespaced id is read back from the SSR markers when the fragment hydrates — click the button and the id stays exactly the same, proving
the value survived from the deferred render into the hydrated client.
Two client-only islands, two ids
$props.id() is minted in the browser at mount. Svelte draws these from a global counter — unique even across
separate
mount() calls — so two independently-mounted islands still get distinct ids (e.g. c1 and c2) without any SSR pass to keep them apart.
$props.id(): {uid}
Rendered on demand in a separate request 🏝️
Rendered on the server, then hydrated 🏝️⚡
Never server-rendered — the id is minted in the browser at mount 🏝️🖥️