Start by creating a new Remix project using create-remix:
npx create-remix@latest my-app
Run the CLI
Run the shadcn-ui init command to setup your project:
npx shadcn@latest init
Configure components.json
You will be asked a few questions to configure components.json:
Which style would you like to use? › New YorkWhich color would you like to use as base color? › ZincDo you want to use CSS variables for colors? › no / yes
App structure
Note: This app structure is only a suggestion. You can place the files wherever you want.
Place the UI components in the app/components/ui folder.
Your own components can be placed in the app/components folder.
The app/lib folder contains all the utility functions. We have a utils.ts where we define the cn helper.
The app/tailwind.css file contains the global CSS.
@blode/ui is the design system: it writes Blode's tokens into your CSS. Skip it and components install but render unstyled, because their variants compile to rounded-[var(--field-radius)] and h-[var(--field-height)].
The command above will add the Button component to your project. You can then import it like this:
import { Button } from "~/components/ui/button";export default function Home() { return ( <div> <Button>Click me</Button> </div> );}