plugins/shadcn-expert/skills/shadcn-components/SKILL.md
Component patterns for shadcn/ui with both Radix UI and Base UI primitives. Covers API differences, mapping between primitives, and correct usage patterns. Use when: building or editing shadcn/ui components, mapping Radix vs Base UI APIs, or choosing composition patterns (asChild vs render).
npx skillsauth add fusengine/agents shadcn-componentsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Before component work, use TeamCreate to spawn agents:
After: Run fuse-ai-pilot:sniper for validation.
| Feature | Description | |---------|-------------| | Radix primitives | Default shadcn/ui since 2021 | | Base UI primitives | New option since late 2025 | | Component mapping | 1:1 mapping between both | | API differences | asChild vs render, naming |
components/ui/
├── dialog.tsx # Adapted to detected primitive
├── select.tsx
├── accordion.tsx
└── ...
-> See dialog-example.md for complete component
ALWAYS consult shadcn MCP before adding components:
mcp__shadcn__search_items_in_registries -> find component
mcp__shadcn__view_items_in_registries -> view source
mcp__shadcn__get_add_command_for_items -> get install command
| Component | Radix Part | Base UI Part |
|-----------|-----------|--------------|
| Dialog | DialogContent | Dialog.Popup |
| Dialog | DialogOverlay | Dialog.Backdrop |
| Select | SelectContent | Select.Positioner + Select.Popup |
| Tooltip | TooltipContent | Tooltip.Positioner + Tooltip.Popup |
| Accordion | AccordionContent | Accordion.Panel |
| Popover | PopoverContent | Popover.Positioner + Popover.Popup |
| Menu | DropdownMenuContent | Menu.Positioner + Menu.Popup |
asChild<Dialog.Trigger asChild>
<Button variant="outline">Open</Button>
</Dialog.Trigger>
render<Dialog.Trigger render={<Button variant="outline" />}>
Open
</Dialog.Trigger>
| Topic | Reference | When to Consult | |-------|-----------|-----------------| | Radix APIs | radix-components.md | Building with Radix primitives | | Base UI APIs | baseui-components.md | Building with Base UI primitives |
| Template | When to Use | |----------|-------------| | dialog-example.md | Creating Dialog components |
testing
Copy self-audit and ban-lists — filler verbs/hype adjectives, slop placeholder names, fake-precise numbers, Title Case headlines, humor in error copy ('Oops!'), em-dash crutch, one copy register per page.
development
Logged-in web apps — dashboards, auth flows, settings, onboarding, data tables, command palettes, modals, toasts. Register `product`: density and glance-speed over marketing polish, no hero/CTA-tricks, every data surface covers empty/loading/error explicitly, tables and dataviz follow preattentive-processing rules.
development
Marketing sites, landing pages, campaign pages — register `brand` (design IS the product). Structure comes from the register's POV + a macrostructure pick, never from copying an inspiration site's section flow. Hero discipline, deviated section order, asymmetric grids, and a silhouette lookalike-test gate before ship.
development
Token-strategy core — OKLCH color rules, neutral tinting, accent-commitment levels, type scale, 8pt spacing grid, touch targets, and the canonical output format of design-system.md (the file the harness gates on). This is routing step 1 of design-method/SKILL.md — read it before design-web/design-webapp/design-ios/design-android, before picking or auditing a single color/type/spacing value.