Installation
How to install dependencies and structure your app.
TypeScript
This project and the components are written in TypeScript. We recommend using TypeScript for your project as well.
Note:
The following guide is for Tailwind v4. If you are using Tailwind v3, use shadcn@2.3.0.
1. Create Project
Run the init command to create a new Next.js project or to setup an existing one:
pnpm dlx shadcn@canary init
2. Add Components
You can now start adding components to your project.
pnpm dlx shadcn@canary add https://8bitcn.com/r/8bit-button.json
The command above will add the Button component to your project. You can then import it like this:
import { Button } from "@/components/ui/8bit/button"
export default function Home() {
return (
<div>
<Button>Click me</Button>
</div>
)
}