Installation

Let's install Svelte AI Elements and start with prompt-input.

1. Create a SvelteKit app

Make sure to select Tailwind CSS and Typescript options for easier integration.

pnpm dlx sv create my-app

2. Initialize shadcn-svelte

pnpm dlx shadcn-svelte@latest init

3. Add prompt-input Component

Install the first component directly from the Svelte AI Elements registry.

pnpm dlx shadcn-svelte@latest add https://svelte-ai-elements.vercel.app/r/prompt-input.json

Usage

Start with a simple prompt surface, then wire onSubmit into your own chat or API flow.

src/routes/+page.svelte