| name | shadcn-components |
| description | Add and use shadcn/ui components. Use when building UI, adding new components, or styling pages with shadcn. |
| allowed-tools | Read, Edit, Write, Bash, Glob |
shadcn/ui Components (FSD)
This project uses shadcn/ui with the neutral theme and all components pre-installed.
FSD Pfad
All components are in frontend/src/shared/ui/:
Layout
card- Card container with header, content, footerseparator- Visual divideraspect-ratio- Maintain aspect ratiosscroll-area- Custom scrollbarsresizable- Resizable panels
Forms
button- Buttons with variantsinput- Text inputtextarea- Multi-line inputlabel- Form labelscheckbox- Checkboxesradio-group- Radio buttonsselect- Dropdown selectswitch- Toggle switchslider- Range sliderform- Form with validationinput-otp- OTP input
Feedback
alert- Alert messagesalert-dialog- Confirmation dialogsdialog- Modal dialogsdrawer- Slide-out drawersheet- Side sheetsonner- Toast notificationsprogress- Progress barskeleton- Loading skeletonspinner- Loading spinner
Navigation
tabs- Tab navigationnavigation-menu- Main navigationmenubar- Menu barbreadcrumb- Breadcrumb navpagination- Page navigationsidebar- App sidebar
Data Display
table- Data tablesavatar- User avatarsbadge- Status badgescalendar- Date picker calendarchart- Charts (recharts)carousel- Image carousel
Overlay
dropdown-menu- Dropdown menuscontext-menu- Right-click menupopover- Popoverstooltip- Tooltipshover-card- Hover cardscommand- Command palette
Other
accordion- Collapsible sectionscollapsible- Toggle contenttoggle- Toggle buttontoggle-group- Button group
Usage Examples
Button Variants
import { Button } from "@shared/ui/button"
<Button>Default</Button>
<Button variant="secondary">Secondary</Button>
<Button variant="outline">Outline</Button>
<Button variant="ghost">Ghost</Button>
<Button variant="destructive">Destructive</Button>
<Button variant="link">Link</Button>
Card
import { Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter } from "@shared/ui/card"
<Card>
<CardHeader>
<CardTitle>Title</CardTitle>
<CardDescription>Description</CardDescription>
</CardHeader>
<CardContent>
Content here
</CardContent>
<CardFooter>
<Button>Action</Button>
</CardFooter>
</Card>
Form with Input
import { Input } from "@shared/ui/input"
import { Label } from "@shared/ui/label"
<div className="space-y-2">
<Label htmlFor="email">Email</Label>
<Input id="email" type="email" placeholder="name@example.com" />
</div>
Dialog
import {
Dialog,
DialogContent,
DialogDescription,
DialogHeader,
DialogTitle,
DialogTrigger,
} from "@shared/ui/dialog"
<Dialog>
<DialogTrigger asChild>
<Button>Open Dialog</Button>
</DialogTrigger>
<DialogContent>
<DialogHeader>
<DialogTitle>Dialog Title</DialogTitle>
<DialogDescription>Dialog description here.</DialogDescription>
</DialogHeader>
<p>Dialog content</p>
</DialogContent>
</Dialog>
Toast (Sonner)
import { toast } from "sonner"
toast.success("Success message")
toast.error("Error message")
toast.info("Info message")
Dark Mode
Components automatically support dark mode via ThemeProvider.
Use ModeToggle from Header Widget:
import { Header } from "@widgets/header"
// ModeToggle is integrated in the Header
<Header user={session.user} />
Adding New Components
If a component is missing (unlikely, all are installed):
bunx shadcn@latest add [component-name]
Styling
Components use Tailwind CSS classes. Customize with className:
<Button className="w-full mt-4">Full Width Button</Button>
Use cn() utility for conditional classes:
import { cn } from "@shared/lib"
<div className={cn("p-4", isActive && "bg-primary")}>