shadcn-component
Add shadcn/ui components to this project. Use when user mentions "add component", "install shadcn", "need a dialog/button/card", or references ui.shadcn.com.
Files1
View on GitHubSKILL.md.claude/skills/shadcn-component/SKILL.md
GitHubAdding shadcn/ui Components
This project uses shadcn/ui with the following configuration (from components.json):
- Style: New York
- Base color: Neutral
- CSS variables: enabled
- Tailwind config:
tailwind.config.ts - Components path:
components/ui - Utils path:
lib/utils
Instructions
Install component using npx:
npx shadcn@latest add <component-name>Common currently installed components: button, dialog, input, badge, alert-dialog, separator, scroll-area, sheet, skeleton, tooltip. Add other shadcn components only when needed.
Component will be created at:
components/ui/<component-name>.tsxImport pattern (follow existing style in
app/page.tsx):import { Button } from '@/components/ui/button'; import { Dialog, DialogContent, DialogHeader, DialogTitle } from '@/components/ui/dialog';For toast notifications, this project uses Sonner (not shadcn toast):
import { toast } from 'sonner'; toast.success('Message here'); toast.error('Error message'); toast.info('Info message');
Project Styling Conventions
- Glass-morphism:
className="glass-card"(defined in globals.css) - Button interactions:
className="btn-press"for press animation - Panel hover:
className="card-hover"for lift effect on custom containers - Gradients:
bg-gradient-to-r from-slate-700 to-slate-600 - Backdrop blur:
backdrop-blur-xlorbackdrop-blur
Examples
- "Add a tabs component" →
npx shadcn@latest add tabs - "I need a modal" →
npx shadcn@latest add dialog - "Add progress bar" →
npx shadcn@latest add progress
Guardrails
- Run
npx shadcn@latest add(not manual creation) to ensure proper setup - Check
components/ui/for existing components before adding duplicates - Sonner is already installed for toasts - don't add shadcn toast
- Confirm with user before running install command