$ show huntabyte/shadcn-svelte
shadcn-svelte is an unofficial Svelte 5 port of shadcn/ui, delivered as a component library, a distribution registry, a CLI installer, and a documentation site. In production it functions as a copy-paste/installable UI kit: the docs site hosts a machine-readable registry of Svelte components, blocks, hooks, and fonts, while the `shadcn-svelte` CLI resolves registry items, rewrites imports/icons/theme tokens, and installs files directly into user projects. The core repo is a pnpm monorepo containing the CLI (`packages/cli`), headless primitives (`packages/primitives`), a parity tool (`packages/parity`), Svelte CLI addons (`sv-addons`), and a SvelteKit docs app (`docs`) that generates the registry JSON consumed by the CLI and serves as the project's public website.
The LLM identified 4 files worth highlighting for reuse:
Standalone engine that extracts, canonicalizes, and pairs Tailwind class strings from this repo's registry against upstream shadcn/ui sources. It uses twMerge-style normalization, runtime token canonicalization for bits/radix CSS variables and data-state spellings, and similarity classification to separate exact, order-only, equivalent, ignored, and genuinely divergent class strings. This is reusable for any framework port or design-system parity audit.
Bit-packed, versioned encoding of design-system presetsβstyle, base color, theme, icon library, menu color/accent, radius, and fontsβinto short base62 strings. It documents strict constraints on field ordering and append-only evolution to preserve backward compatibility. Reusable wherever a UI configuration needs to be compressed into shareable URLs or stable encoded strings.
Headless chat-transcript scroller primitive. It manages auto-scroll modes (follow-bottom, free-scrolling, anchored-to-message), IntersectionObserver visibility tracking, rAF-coalesced resize handling, prepend restoration, and scroll-to-message operations through a set of Svelte 5 state classes. Self-contained and framework-UI-agnostic, it can be extracted into any chat or message-feed component.
PostCSS-based idempotent CSS updater for Tailwind v4. It merges registry theme variables, keyframes, utilities, imports, and custom variants into a project's CSS while preserving structure with dedicated break markers and deduplication. Useful for programmatically generating or patching Tailwind theme CSS without destroying user-authored edits.