shadcn-svelte-inertia
Installation
SKILL.md
shadcn-svelte for Inertia Rails
shadcn-svelte (bits-ui) patterns adapted for Inertia.js + Rails + Svelte. NOT SvelteKit.
Before using a shadcn-svelte example, ask:
- Does it use SvelteKit-specific APIs? (
goto,$app/navigation,loadfunctions,+page.svelte) → Replace with Inertiarouter, server props, page components - Does it use
sveltekit-superforms+zod? → Replace with Inertia<Form>+nameattributes. Inertia handles CSRF, errors, redirects, processing state.
Key Differences from SvelteKit Defaults
| shadcn-svelte default (SvelteKit) | Inertia equivalent |
|---|---|
goto() from $app/navigation |
router from @inertiajs/svelte |
load functions |
Server-rendered props via Rails controller |
+page.svelte / +layout.svelte |
Default exports with module script layout |
sveltekit-superforms + zod |
Inertia <Form> component |
<svelte:head> (SvelteKit auto-manages) |
<svelte:head> (same — no Inertia <Head> in Svelte) |
Setup
Related skills