Installation
Fabric Kit components are copied into your project with the shadcn CLI, so the code is yours to read and change. They need React 19, and work with the Next.js App Router, Vite, or anything else that lets a component import its own .css file (the Next.js Pages Router doesn't). They take your app's font; they're designed with Geist.
1. Set up shadcn (once)
If your project doesn't have a components.json yet:
npx shadcn@latest init2. Add the theme (once)
Every colour, radius, focus ring and curve Fabric Kit uses, as --fabric-* variables. They're prefixed, so they never clash with your own theme. The CLI adds them to your global CSS.
npx shadcn@latest add https://fabrickit.org/r/theme.jsonpnpm dlx shadcn@latest add https://fabrickit.org/r/theme.jsonyarn shadcn@latest add https://fabrickit.org/r/theme.jsonbunx --bun shadcn@latest add https://fabrickit.org/r/theme.json3. Add components
Each component page has its command. For example:
npx shadcn@latest add https://fabrickit.org/r/goo-slider.jsonpnpm dlx shadcn@latest add https://fabrickit.org/r/goo-slider.jsonyarn shadcn@latest add https://fabrickit.org/r/goo-slider.jsonbunx --bun shadcn@latest add https://fabrickit.org/r/goo-slider.jsonLight and dark
Components are dark by default. For light, put data-theme="light" on <html>, or on any element: everything inside it follows, and data-theme="dark" turns a part back. Switch it whenever you like; the components redraw in the new colours, the canvas effects included.
<html data-theme="light">Using next-themes? Have it set the attribute (not a class), with dark first:
<ThemeProvider attribute="data-theme" defaultTheme="dark" themes={["dark", "light"]}>
{children}
</ThemeProvider>Optional: the @fabrickit name
Add the registry to your components.json and you can install by name, like npx shadcn@latest add @fabrickit/goo-slider.
{
"registries": {
"@fabrickit": "https://fabrickit.org/r/{name}.json"
}
}