Copy-paste components for Preact

Build your own shadcn/ui-style Preact kit.

This project ports the shadcn/ui component patterns to Preact with Tailwind CSS v4 and minimal external dependencies. Components are source files you copy into your app, customize, and own.

Copy the code
No npm package. Components live in `src/components/ui`.
Preact first
Uses `preact/compat` only where React-compatible APIs are useful.
Radix-free
Local primitives replace Radix patterns where possible.

Installation

Use `degit` to copy the component source from GitHub. Keep the `@ui/*` and `@/*` aliases or update imports to match your project.

bun add preact class-variance-authority clsx tailwind-merge lucide-preact
bunx degit https://github.com/LiasCode/shadcn-preact/src/components/ui#main ./src/components/ui