shadcn-ui-setup
Automates the installation and configuration of Shadcn/ui and Aceternity UI components within Next.js applications.
Install
mkdir -p .claude/skills/shadcn-ui-setup && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/419" && unzip -o skill.zip -d .claude/skills/shadcn-ui-setup && rm skill.zipInstalls to .claude/skills/shadcn-ui-setup
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Install and configure Shadcn/ui component library with Radix UI primitives, Aceternity UI effects, set up components, and manage the component registry. Use when adding Shadcn/ui to a Next.js project or installing specific UI components for Phase 2.Key capabilities
- →Initialize Shadcn/ui via CLI
- →Integrate Radix UI accessibility primitives
- →Import Aceternity UI visual effects
- →Manage project-specific component registries
- →Configure Tailwind CSS and import aliases
- →Type-safe component customization
How it works
Uses standard CLI commands to pull raw component source code directly into the local file structure for developer modification.
Inputs & outputs
When to use shadcn-ui-setup
- →Initialize Shadcn/ui in a new Next.js project
- →Add specific UI components to an existing codebase
- →Integrate Aceternity UI effects like BackgroundBeams
- →Configure Radix UI primitives for accessibility
About this skill
Shadcn/ui + Aceternity UI Setup and Component Management
⚠️ MANDATORY FIRST STEP
BEFORE RUNNING ANY SETUP COMMANDS: Use Context7 MCP to fetch latest documentation for:
shadcn-ui(initialization, components)aceternity-ui(effects, installation)radix-ui(primitives)
Quick reference for installing, configuring, and using Shadcn/ui components and Aceternity UI effects in Next.js projects.
What is Shadcn/ui?
Shadcn/ui is NOT a traditional component library. It's a collection of copy-paste components built on top of Radix UI primitives. When you add a component, the actual source code is copied into your project, giving you full control.
Benefits:
- Full control over component code
- No dependency bloat
- Customizable with Tailwind CSS
- Accessible by default (Radix UI)
- Type-safe with TypeScript
What is Aceternity UI?
Aceternity UI provides stunning visual effects for landing pages and marketing sections. Like Shadcn/ui, you copy the component code into your project.
Available Effects:
BackgroundBeams- Animated beam lines for hero sectionsTextGenerateEffect- Typewriter text animationMovingBorder- Animated gradient bordersSparklesCore- Particle sparkle effectsBackgroundGradient- Animated gradient backgroundsCardHoverEffect- 3D card hover animations
Quick Start
1. Initialize Shadcn/ui
cd frontend
# Interactive setup (recommended)
npx shadcn-ui@latest init
# You'll be prompted for:
# - TypeScript: Yes
# - Style: Default
# - Base color: Slate (or your preference)
# - Global CSS: src/styles/globals.css
# - CSS variables: Yes
# - Tailwind config: tailwind.config.ts
# - Import alias: @/components
# - React Server Components: Yes
This creates:
components.json- Configuration filesrc/components/ui/- Component directorysrc/lib/utils.ts- Utility functions (cn helper)- Updates
tailwind.config.tsandglobals.css
2. Setup Aceternity UI Directory
# Create Aceternity UI directory
mkdir -p src/components/aceternity
# Install required dependencies
npm install framer-motion tailwind-merge clsx
3. Configuration File
After init, components.json looks like:
{
"$schema": "https://ui.shadcn.com/schema.json",
"style": "default",
"rsc": true,
"tsx": true,
"tailwind": {
"config": "tailwind.config.ts",
"css": "src/styles/globals.css",
"baseColor": "slate",
"cssVariables": true,
"prefix": ""
},
"aliases": {
"components": "@/components",
"utils": "@/lib/utils"
}
}
Installing Components
Core Components for Phase 2
# Essential form components
npx shadcn-ui@latest add button
npx shadcn-ui@latest add input
npx shadcn-ui@latest add textarea
npx shadcn-ui@latest add label
npx shadcn-ui@latest add checkbox
npx shadcn-ui@latest add form
# Layout components
npx shadcn-ui@latest add card
npx shadcn-ui@latest add separator
# Feedback components
npx shadcn-ui@latest add dialog
npx shadcn-ui@latest add toast
npx shadcn-ui@latest add alert
npx shadcn-ui@latest add skeleton
# Navigation
npx shadcn-ui@latest add dropdown-menu
npx shadcn-ui@latest add avatar
# Optional utility components
npx shadcn-ui@latest add scroll-area
npx shadcn-ui@latest add tooltip
npx shadcn-ui@latest add badge
Install Multiple at Once
npx shadcn-ui@latest add button input textarea label checkbox form card dialog toast
Component Usage Examples
Button Component
import { Button } from '@/components/ui/button'
export function ButtonExample() {
return (
<div className="flex gap-2">
<Button>Default</Button>
<Button variant="secondary">Secondary</Button>
<Button variant="destructive">Destructive</Button>
<Button variant="outline">Outline</Button>
<Button variant="ghost">Ghost</Button>
<Button variant="link">Link</Button>
<Button size="sm">Small</Button>
<Button size="lg">Large</Button>
<Button disabled>Disabled</Button>
</div>
)
}
Card Component
import {
Card,
CardContent,
CardDescription,
CardFooter,
CardHeader,
CardTitle,
} from '@/components/ui/card'
import { Button } from '@/components/ui/button'
export function TaskCard({ task }: { task: Task }) {
return (
<Card>
<CardHeader>
<CardTitle>{task.title}</CardTitle>
<CardDescription>
Created {new Date(task.created_at).toLocaleDateString()}
</CardDescription>
</CardHeader>
<CardContent>
<p>{task.description}</p>
</CardContent>
<CardFooter className="flex justify-between">
<Button variant="outline">Edit</Button>
<Button variant="destructive">Delete</Button>
</CardFooter>
</Card>
)
}
Form with Input and Validation
'use client'
import { useForm } from 'react-hook-form'
import { zodResolver } from '@hookform/resolvers/zod'
import * as z from 'zod'
import {
Form,
FormControl,
FormDescription,
FormField,
FormItem,
FormLabel,
FormMessage,
} from '@/components/ui/form'
import { Input } from '@/components/ui/input'
import { Textarea } from '@/components/ui/textarea'
import { Button } from '@/components/ui/button'
const taskSchema = z.object({
title: z.string().min(1, 'Title is required').max(200),
description: z.string().max(1000).optional(),
})
type TaskFormValues = z.infer<typeof taskSchema>
export function TaskForm({ onSubmit }: { onSubmit: (data: TaskFormValues) => void }) {
const form = useForm<TaskFormValues>({
resolver: zodResolver(taskSchema),
defaultValues: {
title: '',
description: '',
},
})
return (
<Form {...form}>
<form onSubmit={form.handleSubmit(onSubmit)} className="space-y-4">
<FormField
control={form.control}
name="title"
render={({ field }) => (
<FormItem>
<FormLabel>Title</FormLabel>
<FormControl>
<Input placeholder="Enter task title" {...field} />
</FormControl>
<FormMessage />
</FormItem>
)}
/>
<FormField
control={form.control}
name="description"
render={({ field }) => (
<FormItem>
<FormLabel>Description</FormLabel>
<FormControl>
<Textarea placeholder="Enter task description" {...field} />
</FormControl>
<FormDescription>
Optional description for your task
</FormDescription>
<FormMessage />
</FormItem>
)}
/>
<Button type="submit">Create Task</Button>
</form>
</Form>
)
}
Dialog (Modal) Component
'use client'
import { useState } from 'react'
import {
Dialog,
DialogContent,
DialogDescription,
DialogFooter,
DialogHeader,
DialogTitle,
DialogTrigger,
} from '@/components/ui/dialog'
import { Button } from '@/components/ui/button'
import { TaskForm } from './task-form'
export function CreateTaskDialog() {
const [open, setOpen] = useState(false)
const handleSubmit = async (data: TaskFormValues) => {
// Create task
await createTask(data)
setOpen(false)
}
return (
<Dialog open={open} onOpenChange={setOpen}>
<DialogTrigger asChild>
<Button>Create Task</Button>
</DialogTrigger>
<DialogContent className="sm:max-w-[425px]">
<DialogHeader>
<DialogTitle>Create New Task</DialogTitle>
<DialogDescription>
Add a new task to your todo list
</DialogDescription>
</DialogHeader>
<TaskForm onSubmit={handleSubmit} />
</DialogContent>
</Dialog>
)
}
Toast Notifications
First, set up the Toaster in your root layout:
// app/layout.tsx
import { Toaster } from '@/components/ui/toaster'
export default function RootLayout({ children }: { children: React.ReactNode }) {
return (
<html lang="en">
<body>
{children}
<Toaster />
</body>
</html>
)
}
Then use the toast hook:
'use client'
import { useToast } from '@/hooks/use-toast'
import { Button } from '@/components/ui/button'
export function TaskActions() {
const { toast } = useToast()
const handleDelete = async () => {
try {
await deleteTask(taskId)
toast({
title: 'Task deleted',
description: 'Your task has been successfully deleted',
})
} catch (error) {
toast({
variant: 'destructive',
title: 'Error',
description: 'Failed to delete task. Please try again.',
})
}
}
return <Button variant="destructive" onClick={handleDelete}>Delete</Button>
}
Checkbox Component
'use client'
import { Checkbox } from '@/components/ui/checkbox'
import { Label } from '@/components/ui/label'
export function TaskItem({ task }: { task: Task }) {
const [isCompleted, setIsCompleted] = useState(task.completed)
const handleToggle = async (checked: boolean) => {
setIsCompleted(checked)
await toggleTask(task.id)
}
return (
<div className="flex items-center space-x-3">
<Checkbox
id={`task-${task.id}`}
checked={isCompleted}
onCheckedChange={handleToggle}
/>
<Label
htmlFor={`task-${task.id}`}
className={isCompleted ? 'line-through text-muted-foreground' : ''}
>
{task.title}
</Label>
</div>
)
}
Customizing Components
Modifying Existing Components
All component source code is in src/components/ui/. You can edit directly:
// src/components/ui/button.tsx
import * as React from 'react'
import { cva, type VariantProps } from 'class-variance-authority'
const buttonVariants = cva(
'inline-flex items-center just
---
*Content truncated.*
When not to use it
- →Projects not using Tailwind CSS
- →Adding components to non-Next.js frameworks not officially supported
- →Large scale monolithic app styling from scratch
Prerequisites
Limitations
- →Manual updates required for component code
- →Requires consistent Tailwind configurations
- →Setup can conflict with custom build tools
How it compares
Provides local file control over components instead of black-box dependency management.
Compared to similar skills
shadcn-ui-setup side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| shadcn-ui-setup (this skill) | 37 | 8mo | Review | Beginner |
| nextjs15-init | 8 | 9mo | Review | Beginner |
| ui-ux-expert-skill | 91 | 9mo | Review | Advanced |
| web-artifacts-builder | 49 | 3mo | Review | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by maneeshanif
View all by maneeshanif →You might also like
nextjs15-init
bear2u
Use when user wants to create a new Next.js 15 project (Todo/Blog/Dashboard/E-commerce/Custom domain) with App Router, ShadCN, Zustand, Tanstack Query, and modern Next.js stack
ui-ux-expert-skill
fercracix33
Technical workflow for implementing accessible React user interfaces with shadcn/ui, Tailwind CSS, and TanStack Query. Includes 6-phase process with mandatory Style Guide compliance, Context7 best practices consultation, Chrome DevTools validation, and WCAG 2.1 AA accessibility standards. Use after Test Agent, Implementer, and Supabase agents complete their work.
web-artifacts-builder
anthropics
Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use for complex artifacts requiring state management, routing, or shadcn/ui components - not for simple single-file HTML/JSX artifacts.
landing-page-guide-v2
bear2u
Create distinctive, high-converting landing pages that combine proven conversion elements with exceptional design quality. Build beautiful, memorable landing pages using Next.js 14+ and ShadCN UI that avoid generic AI aesthetics while following the 11 essential elements framework.
frontend-developer
sickn33
Build React components, implement responsive layouts, and handle client-side state management. Masters React 19, Next.js 15, and modern frontend architecture. Optimizes performance and ensures accessibility. Use PROACTIVELY when creating UI components or fixing frontend issues.
frontend-code-review
langgenius
Trigger when the user requests a review of frontend files (e.g., `.tsx`, `.ts`, `.js`). Support both pending-change reviews and focused file reviews while applying the checklist rules.