Installation

Prerequisites

Before installing, ensure you have the following:

Install shadcn-svelte

First, you'll need to install and configure shadcn-svelte in your project. Follow the installation guide at shadcn-svelte documentation.

Once shadcn-svelte is set up, you can install svelte prompt-kit components using the shadcn CLI.

Using the shadcn CLI

Install components individually using the following format:

Installation

pnpm dlx shadcn-svelte@latest add https://svelte-ai-elements.vercel.app/p/[component-name].json

Replace [component-name] with the name of the component you want to install.

Installation Examples

Here are some examples of installing specific components:

Prompt Input

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

Message

pnpm dlx shadcn-svelte@latest add https://svelte-ai-elements.vercel.app/p/message.json

Chain of Thought

pnpm dlx shadcn-svelte@latest add https://svelte-ai-elements.vercel.app/p/chain-of-thought.json

Chat Container

pnpm dlx shadcn-svelte@latest add https://svelte-ai-elements.vercel.app/p/chat-container.json

Usage

After installation, import and start using the components in your project. Here are some common import patterns:

Basic Example

Here's a simple example combining Message components:

LLM-Friendly Documentation

For AI assistants and LLMs, we provide a comprehensive llms.txt file with all component documentation:

llms.txt
Complete component documentation for AI assistants