npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@puredev/shadcn-svelte-tw

v0.1.0

Published

A Shadcn Svelte component library built for simple and easy use in SvelteKit projects.

Readme

Shadcn Svelte as Package

You're reading this correctly: this package does exactly what the original Shadcn authors advise against.

Sometimes you just want a UI library you can drop into your app and start using—no custom CLI, no syncing with a company design system, and no maintaining hundreds of copied component files. In those cases, the "recommended" approach quickly stops being fun or practical.

This package is for that scenario: install it, use it, and forget about the messy implementation details.

If you do want deep customization or design-system alignment, you should use the original Shadcn library and follow its official guidelines.

Installation

Install the package along with its peer dependencies:

# npm
npm i @puredev/shadcn-svelte-tw tailwindcss tw-animate-css

# bun
bun i @puredev/shadcn-svelte-tw tailwindcss tw-animate-css

Tailwind CSS v4 Setup

This library requires Tailwind CSS v4 to be configured in your project. If you already have Tailwind working, skip this section.

Tailwind v4 needs a build tool integration to process its CSS directives. Pick the one that matches your setup:

| Build tool | Package | Docs | | ------------------------ | ---------------------- | -------------------------------------------------------------------------------------------------------- | | Vite (SvelteKit default) | @tailwindcss/vite | tailwindcss.com/docs/installation/vite | | PostCSS | @tailwindcss/postcss | tailwindcss.com/docs/installation/postcss | | CLI | @tailwindcss/cli | tailwindcss.com/docs/installation/tailwind-cli |

Most SvelteKit projects use Vite, so the typical setup is:

npm i -D @tailwindcss/vite
// vite.config.ts
import tailwindcss from '@tailwindcss/vite';
import { sveltekit } from '@sveltejs/kit/vite';
import { defineConfig } from 'vite';

export default defineConfig({ plugins: [tailwindcss(), sveltekit()] });

CSS Setup

Add the following three imports to your global CSS file (e.g. src/app.css):

@import 'tailwindcss';
@import 'tw-animate-css';
@import '@puredev/shadcn-svelte-tw/theme.css';

The order matters — tailwindcss must come first, then tw-animate-css (provides accordion/collapsible animations), then the theme which defines color tokens, radius values, and base styles.

Then import that CSS file in your root layout:

<!-- src/routes/+layout.svelte -->
<script>
  import '../app.css';

  const { children } = $props();
</script>

{@render children()}

Usage

Components are exported as namespaces to avoid naming collisions:

<script>
  import { Button, Card, Accordion } from '@puredev/shadcn-svelte-tw';
</script>

<Button variant="outline">Click me</Button>

<Card>
  <Card.Header>
    <Card.Title>Hello</Card.Title>
  </Card.Header>
  <Card.Content>World</Card.Content>
</Card>

<Accordion type="single">
  <Accordion.Item value="item-1">
    <Accordion.Trigger>Open</Accordion.Trigger>
    <Accordion.Content>Content here</Accordion.Content>
  </Accordion.Item>
</Accordion>

Customizing the theme

The theme uses CSS custom properties, so you can override any token after the import:

@import 'tailwindcss';
@import 'tw-animate-css';
@import '@puredev/shadcn-svelte-tw/theme.css';

:root {
  --radius: 0.5rem;
  --primary: oklch(0.6 0.25 260);
  --primary-foreground: oklch(1 0 0);
}