Docs
SvelteKit
SvelteKit
How to setup shadcn-svelte in a SvelteKit project.
Setup your project
Create project
Use the SvelteKit CLI to create a new project.
Add TailwindCSS
Use the svelte-add
CLI to add Tailwind CSS to your project.
Install dependencies
Setup path aliases
If you are not using the default alias $lib
, you'll need to update your svelte.config.js
file to include those aliases.
Run the CLI
Configure components.json
You will be asked a few questions to configure components.json
:
That's it
You can now start adding components to your project.
The command above will add the Button
component to your project. You can then import it like this:
On This Page