Getting Started
Add n3wth/kit components to your project and configure AI tools to generate on-brand code.
Prerequisites
You need an existing React or Next.js project with the following set up:
- Node.js 18+
- A Next.js or React project
- Tailwind CSS v4 (uses
@import "tailwindcss"syntax) - shadcn/ui initialized — run
npx shadcn initif not yet set up
New project from scratch:
npx create-next-app@latest my-app --typescript --tailwind --app cd my-app npx shadcn init
1. Install the n3wth style
Start by installing the base style. This sets up the design tokens — colors, typography, and border radius — used by all n3wth components.
npx shadcn add https://kit.newth.ai/r/n3wth.json
This updates your globals.css with CSS variables for the full n3wth color palette and adds the cn utility.
2. Install components
Use the shadcn CLI to add individual components from the registry. Each component is copied directly into your project so you own and can modify the source.
npx shadcn add https://kit.newth.ai/r/button.json npx shadcn add https://kit.newth.ai/r/card.json npx shadcn add https://kit.newth.ai/r/input.json
Components are installed to components/ui/ by default. See the component gallery for all available components and their install commands.
3. Use your first component
Import and use components like any React component:
import { Button } from '@/components/ui/button'
import { Card, CardHeader, CardTitle, CardContent } from '@/components/ui/card'
export default function Page() {
return (
<Card>
<CardHeader>
<CardTitle>Welcome</CardTitle>
</CardHeader>
<CardContent>
<Button>Get started</Button>
<Button variant="secondary">Learn more</Button>
</CardContent>
</Card>
)
}Button variants:
<Button>Primary</Button> <Button variant="secondary">Secondary</Button> <Button variant="ghost">Ghost</Button> <Button size="sm">Small</Button> <Button size="lg">Large</Button> <Button isLoading>Loading...</Button>
Input with icon:
import { Input } from '@/components/ui/input'
import { Search } from 'lucide-react'
<Input
placeholder="Search..."
leftIcon={<Search className="h-4 w-4" />}
/>
<Input
placeholder="Email"
type="email"
error="Please enter a valid email"
/>4. Set up AI context packs
Context packs teach your AI coding tool about the n3wth design system. With them loaded, generated code uses your components correctly — right variants, right props, right patterns.
Cursor
Add the .cursorrules file to your project root:
curl -o .cursorrules https://kit.newth.ai/ai/.cursorrules
Commit this file so your whole team gets the same AI context. See the Cursor integration guide for MCP setup.
Claude Code
Download the CLAUDE.md context file:
curl -o CLAUDE.md https://kit.newth.ai/ai/CLAUDE.md
Claude Code reads CLAUDE.md automatically at startup. See the Claude Code integration guide for MCP setup.
v0
Point v0 at the registry URL in your prompts:
Use components from https://kit.newth.ai/r — build a settings page with Card and Input
See the v0 integration guide for full details.
Registry URL
All components are available at:
https://kit.newth.ai/r
Append <name>.json for a specific component: https://kit.newth.ai/r/badge.json
Full registry manifest: https://kit.newth.ai/r/registry.json
Troubleshooting
“Cannot find module @/components/ui/button”
Make sure you have a path alias configured. In tsconfig.json:
{
"compilerOptions": {
"paths": {
"@/*": ["./*"]
}
}
}Styles not applying
n3wth/kit requires Tailwind CSS v4. Check your globals.css starts with:
@import "tailwindcss";
If you see @tailwind base directives instead, you are on Tailwind v3. See the Tailwind v4 upgrade guide.
shadcn prompts to overwrite existing components
If you have existing shadcn components, you will be prompted before any file is overwritten. Review the diff before confirming — n3wth components use different variant names and props from default shadcn components.
“Could not resolve registry”
Verify the registry is reachable. If kit.newth.ai is down, check github.com/n3wth/kit and install directly from the source.
Peer dependency warnings
Some components depend on lucide-react and class-variance-authority. Install them if needed:
npm install lucide-react class-variance-authority clsx tailwind-merge