shadcn-ui

Installs and configures shadcn/ui components for React projects with recipes and gotcha fixes.

1|Updated Aug 18, 2026
One-click install
npx skills add https://github.com/scsm-unrestrict/dsh-frontend-engineer-agent --skill shadcn-ui-scsm-unrestrict
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: shadcn-ui
Source: https://github.com/scsm-unrestrict/dsh-frontend-engineer-agent/tree/main/frontend-engineer/skills/shadcn-ui
Command: npx skills add https://github.com/scsm-unrestrict/dsh-frontend-engineer-agent --skill shadcn-ui-scsm-unrestrict

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires react-hook-form, zod, @hookform/resolvers, sonner, @tanstack/react-table, cmdk, lucide-react, and includes references (resource) components.

What problem does it solve? Adding shadcn/ui components to a React project involves dependency ordering, external package requirements, and subtle bugs (empty Select values, null form fields, tree-shaken icons) that repeatedly break builds. This Skill provides the correct installation order, external dependency mapping, documented fixes for known issues, and complete working component recipes. ## Core Features & Use Cases - Ordered Component Installation: Foundation components first (Button, Input, Card), then feature components (Form, Dialog, Table, Toast) with their external dependencies like react-hook-form, zod, and @tanstack/react-table. - Documented Gotcha Fixes: Corrections for Radix Select empty strings, React Hook Form null values, Lucide icon tree-shaking, and Dialog width overrides. - Complete UI Recipes: Working code for contact forms, sortable data tables, modal CRUD, responsive navigation, and settings pages. - Use Case: After setting up a Tailwind theme, you need an admin CRUD interface. The Skill installs Dialog, Form, Table, Button, and Toast in the right order, then provides a working modal CRUD pattern using semantic theme tokens. ## Quick Start Install and configure shadcn/ui form and table components in my React project and build a data table with sorting and search.

Frequently Asked Questions about shadcn-ui

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I install shadcn/ui components in a React project?

Run pnpm dlx shadcn@latest add followed by the component name, installing foundation components like button, input, and card first. Feature components such as form, dialog, and table are added afterward as needed, with external dependencies installed separately via pnpm add.

How to build a form with shadcn/ui and react-hook-form?

Install the form component plus react-hook-form, zod, and @hookform/resolvers, then define a zod schema and use FormField with FormItem, FormLabel, FormControl, and FormMessage. Pass field props individually with value={field.value ?? ''} instead of spreading to avoid null value errors.

Why does shadcn Select break with empty string values?

Radix Select does not accept empty strings as item values, so <SelectItem value=""> throws an error. Use a sentinel value like "__any__" for options such as "All", then convert it back to an empty string when reading the selected value.

Does shadcn/ui data table support sorting and pagination?

Yes, by combining the table component with @tanstack/react-table. Use useReactTable with getSortedRowModel, getFilteredRowModel, and getPaginationRowModel to enable column sorting, global search, and page navigation controls.

Why do Lucide icons disappear in production builds?

Dynamic imports like LucideIcons[iconName] get tree-shaken in production, so icons fail to render. Use an explicit icon map with direct named imports such as { Home, Users, Settings } to guarantee the icons are bundled.

When should I set up shadcn/ui relative to Tailwind theming?

Set up the Tailwind theme infrastructure first, including CSS variables, ThemeProvider, dark mode, components.json, and the cn() utility. shadcn/ui components rely on these semantic tokens, so installing components before the theme exists produces unstyled output.