Search for a command to run...
Install and configure shadcn/ui with Zaidan for TanStack Start.
Run the following command to create a new TanStack Start project with shadcn/ui:
npx @tanstack/cli@latest create --framework Solid --tailwindpnpx @tanstack/cli create --framework Solid --tailwindyarn dlx @tanstack/cli@latest create --framework Solid --tailwindbunx @tanstack/cli@latest create --framework Solid --tailwindRun the shadcn init command to setup your project:
npx shadcn@latest initpnpx shadcn inityarn dlx shadcn@latest initbunx shadcn@latest initUpdate the components.json file to point to the Zaidan registry and use the kobalte style:
1{2 "$schema": "https://ui.shadcn.com/schema.json",3 "style": "kobalte",4 "rsc": false,5 "tsx": true,6 "tailwind": {7 "config": "",8 "css": "src/styles/globals.css",9 "baseColor": "neutral", // or "gray", "stone", "zinc"10 "cssVariables": true,11 "prefix": ""12 },13 "iconLibrary": "lucide",14 "rtl": false,15 "aliases": {16 "components": "@/components",17 "utils": "@/lib/utils",18 "ui": "@/components/ui",19 "lib": "@/lib",20 "hooks": "@/hooks"21 },22 "menuColor": "default", // or "inverted"23 "menuAccent": "subtle", // or "bold"24 "registries": {25 "@zaidan": "https://zaidan.carere.dev/r/{style}/{name}.json"26 }27}Customize your Design System then
You can now start adding components to your project.
npx shadcn@latest add @zaidan/buttonpnpx shadcn add @zaidan/buttonyarn dlx shadcn@latest add @zaidan/buttonbunx shadcn@latest add @zaidan/buttonThe command above will add the Button component to your project. You can then import it like this:
1import { createFileRoute } from "@tanstack/solid-router"2
3import { Button } from "@/components/ui/button"4
5export const Route = createFileRoute("/")({6 component: App,7})8
9function App() {10 return (11 <div>12 <Button>Click me</Button>13 </div>14 )15}