Loading...
Loading...
Builds accessible, customizable component libraries using shadcn/ui with Radix UI or Base UI, Tailwind CSS 4, and React 19. Covers component ownership, oklch CSS theming, type-safe forms with Field and Zod, CLI workflows, and registry patterns. Use when adding shadcn/ui components, configuring themes, building forms with Zod, creating custom registries, or composing accessible component variants. Use for shadcn CLI, dark mode, component variants, form validation.
npx skill4agent add oakoss/agent-skills shadcn-ui| Pattern | API / Approach | Key Points |
|---|---|---|
| Init project | | Auto-detects framework, configures CSS variables |
| Add component | | Copies source code into your project |
| Custom project | | Pick library (Radix/Base UI), style, theme, fonts |
| Check updates | | Shows upstream changes for your components |
| Search registry | | Browse and install from namespaced registries |
| Build registry | | Generate registry JSON from |
| Theme tokens | | oklch color values, dark mode via |
| Dark mode | | Swaps CSS variables under |
| Component variant | | Type-safe variant definitions |
| Polymorphic slot | | Merge props onto child element |
| Direct ref | | |
| Form (current) | | Replaces legacy |
| Form (legacy) | | Still works but no longer actively developed |
| Class merging | | Safely merge Tailwind classes without conflicts |
| Mistake | Correct Pattern |
|---|---|
| Installing shadcn/ui as an npm dependency | Use the CLI ( |
Using | Pass |
| Using HSL values for color tokens | Use oklch format: |
Wrapping variables with | Reference CSS variables directly: |
Putting tokens directly in | Use |
Using legacy | Use |
| Skipping Zod validation in form components | Always pair forms with Zod schemas for type-safe validation |
Using | Use Radix or Base UI primitives for semantic HTML and accessibility |
Modifying components in | Components live in your source tree -- own and customize directly |
Using old CLI command | Use |
ExploreTaskPlanTask