# shadcn-svelte — card for AI agents

Svelte port of shadcn/ui with components and blocks (dashboards, sidebars, login); add them with the shadcn-svelte CLI.

Category: Website sections and blocks (also: UI kits and website templates) · maker Hunter Johnston and contributors · checked 2026-11-05 · style: minimal

## Price
- Price: Free
- Free tier: Fully free.

## License
MIT — https://raw.githubusercontent.com/huntabyte/shadcn-svelte/main/LICENSE.md

- commercial: **yes** (Commercial use OK)
  > Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software
  (https://raw.githubusercontent.com/huntabyte/shadcn-svelte/main/LICENSE.md)
- attribution: **no** (No credit needed)
  > The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
  (https://raw.githubusercontent.com/huntabyte/shadcn-svelte/main/LICENSE.md)
- in app: **yes** (Can ship inside your app)
  > Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software
  (https://raw.githubusercontent.com/huntabyte/shadcn-svelte/main/LICENSE.md)
- redistribute: **yes** (Can pass the files on to your own users)
  > Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software
  (https://raw.githubusercontent.com/huntabyte/shadcn-svelte/main/LICENSE.md)

## Rules to follow
- Keep the MIT copyright notice in the code if you redistribute it.
- No visible credit on the site is required by the licence.

## Can an AI agent use it by itself?
**Yes** · package: Agent installs a package or loads it from a CDN

## How an agent gets files
- npx shadcn-svelte@latest add <component or block>; no account. (sign-in: none)
- Formats: svelte
- Not allowed: Needs Svelte + Tailwind

## How to connect
- Package (npm/PyPI)
- npm: `npm install shadcn-svelte`
- Repository: https://github.com/huntabyte/shadcn-svelte
- Website: https://www.shadcn-svelte.com

## Numbers (AgentGid data)
- Gid Score: 42
- GitHub stars: 9,263
- Downloads last week: 316,455
- Used in 4 public projects set up for AI coding agents

## Lines to paste into your prompt or AGENTS.md

```
- shadcn-svelte (Website sections and blocks, UI kits and website templates). Svelte port of shadcn/ui with components and blocks (dashboards, sidebars, login); add them with the shadcn-svelte CLI. Price: free; commercial use OK; no credit needed. Style: minimal.
  Connect: npm shadcn-svelte.
  Get files: npx shadcn-svelte@latest add <component or block>; no account (svelte).
  Not allowed: Needs Svelte + Tailwind
  Rule: Keep the MIT copyright notice in the code if you redistribute it.
  Rule: No visible credit on the site is required by the licence.
  License: https://raw.githubusercontent.com/huntabyte/shadcn-svelte/main/LICENSE.md (checked 2026-11-05; details: https://agentgid.com/assets/shadcn-svelte/)
```

## Links
- AgentGid page: https://agentgid.com/assets/shadcn-svelte/
- Is it free for commercial use? https://agentgid.com/assets/shadcn-svelte/commercial-use/
- Source: https://www.shadcn-svelte.com/
- Source: https://github.com/huntabyte/shadcn-svelte


## shadcn-svelte: ready interface pieces for Svelte apps

shadcn-svelte is a free set of ready interface pieces for apps made with Svelte, such as buttons, forms, menus, sidebars and login pages. A small command copies the code of each piece into your own project, so you or your AI assistant can change it freely. It is a community version of the popular shadcn/ui set, which was made for React.

### Where to use it
- Buttons, forms and dialogs: Add the basic pieces of an app screen one by one, like a button, an input or a pop-up dialog, all in one matching style.
- An admin dashboard in one step: Start an admin or account area from a ready page with a side menu, charts and a data table, then change the parts you need.
- Login and sign-up pages: Get a ready login page with a form and a picture, and connect it to the sign-in service you already use.
- A light and dark theme switch: Let visitors switch your site between light and dark with one button that remembers their choice.
- Your own design system: Use the pieces as a starting point for your own house style. You change colors and shapes in your own copy instead of fighting a locked library.
- A chat screen for an AI agent: Build the screen of an AI helper with ready parts for messages, the agent's steps, sources and a message field.

### How to start
- Create a SvelteKit project with Tailwind CSS (skip if you have one).

```
npx sv create my-app --add tailwindcss
```

- Set up shadcn-svelte in the project. It asks a few questions and overwrites your global style file, so commit first.

```
npx shadcn-svelte@latest init
```

- Add a component and use it in a page.

```
npx shadcn-svelte@latest add button

<script lang="ts">
  import { Button } from "$lib/components/ui/button/index.js";
</script>
<Button>Click me</Button>
```


### License
MIT license: free to use in personal and paid products, and you may change and share the code. Keep the copyright and license notice with copies of the code.

### Good to know
- The current version is for Svelte 5 with Tailwind CSS 4. Older setups have their own separate docs sites.
- The setup step rewrites your main style file. Save or commit your work before you run it.
- The code lives in your project after you add it. Fixes to the visible part do not arrive by themselves; deeper parts update with the packages under them.
- It is a community project, not made by the shadcn/ui team, though it started with their blessing.
- The pieces are written in TypeScript. A plain JavaScript version is available only through the setup command.

Checked 2026-11-09 against: https://www.shadcn-svelte.com/, https://www.shadcn-svelte.com/docs, https://www.shadcn-svelte.com/blocks, https://www.shadcn-svelte.com/llms.txt, https://shadcn-svelte.com/docs.md, https://shadcn-svelte.com/docs/about.md, https://shadcn-svelte.com/docs/cli.md, https://shadcn-svelte.com/docs/javascript.md, https://shadcn-svelte.com/docs/legacy.md, https://shadcn-svelte.com/docs/changelog.md, https://shadcn-svelte.com/docs/installation/sveltekit.md, https://shadcn-svelte.com/docs/installation/vite.md, https://shadcn-svelte.com/docs/installation/manual.md, https://shadcn-svelte.com/docs/dark-mode/svelte.md, https://shadcn-svelte.com/docs/components/sidebar.md, https://shadcn-svelte.com/docs/components/button.md, https://shadcn-svelte.com/docs/theming.md, https://shadcn-svelte.com/docs/components-json.md, https://github.com/huntabyte/shadcn-svelte/blob/main/README.md, https://github.com/huntabyte/shadcn-svelte/blob/main/LICENSE.md, https://registry.npmjs.org/shadcn-svelte/latest

### Mistakes to avoid
- Don't: npm install shadcn-svelte, then import { Button } from 'shadcn-svelte' → Do: Run the add command; it copies the component into src/lib/components/ui, and you import it from $lib/components/ui/button/index.js (shadcn-svelte is a tool that copies code, not a component package to import from.)
- Don't: Running npx shadcn-svelte@latest init in a project with uncommitted styles → Do: Commit first, pin the version (npx shadcn-svelte@1.8.0 init) and pass the CSS path you expect (init overwrites the global CSS file, and @latest can change between runs.)
- Don't: Following the current docs in a Svelte 4 or Tailwind v3 project → Do: Upgrade to Svelte 5 and Tailwind v4, or use the legacy docs that match your versions (The current components and setup target Svelte 5 with Tailwind v4.)
- Don't: Copying the .ts component files by hand into a JavaScript-only project → Do: Set "typescript": false in components.json, then add components with the command (The JavaScript versions are produced only by the command.)
- Don't: Adding a theme toggle without ModeWatcher in the root layout → Do: Install mode-watcher and put <ModeWatcher /> in src/routes/+layout.svelte before using toggleMode (The dark mode setup in the docs depends on ModeWatcher in the root layout.)

### Questions
- Is shadcn-svelte the official shadcn/ui? No. It is an unofficial, community-led Svelte version of shadcn/ui, made with the original author's blessing.
- Can I use it in a paid product? Yes. It is under the MIT license; keep the copyright and license notice with copies of the code.
- Does it work with Svelte 4 or Tailwind 3? The current docs are for Svelte 5 with Tailwind 4. Older setups have separate legacy docs.
- Do I have to use TypeScript? No. Set typescript to false in components.json and the setup command gives you plain JavaScript versions.
- How do I get updates? The code you added is yours to change, so it does not update by itself. Deeper fixes come by updating packages it is built on, such as bits-ui.

---
AgentGid's catalog is curated: every entry was checked against the maker's official pages (registry, repository, license and pricing pages) on the date shown; a license value shows the quote it stands on wherever AgentGid has one. Usage numbers come from AgentGid's own scan of public repositories set up for AI coding agents. Claims by makers are reported, not tested by AgentGid.
