UI Components

UI Components

Warpkit ships with shadcn/ui pre-configured. Components live in src/components/ui/ and are fully owned by you , no package to update, no API surface to pin.

How shadcn/ui works

shadcn/ui is a CLI that copies component source into your repo. You own the code. If you need to change a component, edit it directly.

Configuration lives in components.json at the root. It tells the CLI where to put files, which path alias to use (@/), and which base color the theme is using.

Adding a component

bunx shadcn add <component-name>
# example: bunx shadcn add table

The component lands in src/components/ui/. After adding, export it from src/components/ui/index.ts so the rest of the app can import from @/components/ui.

Components included

ComponentFileNotes
Accordionaccordion.tsxCollapsible sections
Badgebadge.tsxStatus chips
Buttonbutton.tsxPrimary, secondary, destructive variants
Cardcard.tsxContainer with header/content/footer slots
Checkboxcheckbox.tsx
Dialogdialog.tsxModal overlay
Dropdown Menudropdown-menu.tsxRadix-based menu
Inputinput.tsxText input
Labellabel.tsxAccessible form labels
Popoverpopover.tsxFloating content
Progressprogress.tsx
Scroll Areascroll-area.tsxCustom scrollbar
Selectselect.tsx
Separatorseparator.tsx
Skeletonskeleton.tsxLoading placeholder
Switchswitch.tsxToggle
Tabstabs.tsx
Toasttoast.tsxNotification system
Tooltiptooltip.tsx

Custom components also in src/components/ui/:

ComponentNotes
animate-in.tsxFade/slide-in wrapper
confetti.tsxCelebration effect
confirm-dialog.tsx"Are you sure?" dialog
copy-value.tsxCopy to clipboard with feedback
error-banner.tsxForm/page error display
fieldset.tsxGrouped form fields
form-field.tsxLabel + input + error message
multi-state-badge.tsxBadge with status variants
spinner.tsxLoading spinner

The cn utility

All components use cn() for conditional class names:

import { cn } from '@/lib/utils';

<div className={cn('base-class', isActive && 'active-class', className)} />

cn merges Tailwind classes correctly , later classes override earlier ones, no duplicates.

Importing components

import { Button, Card, Input } from '@/components/ui';

All components are re-exported from src/components/ui/index.ts.

Dark mode

All shadcn/ui components support dark mode out of the box via CSS variables. The dark class is toggled on <html> by the theme hook in src/hooks/use-theme.ts. No extra configuration needed.

  • Theming , swap color palettes with one command