This skill should be used when creating, modifying, or reviewing React UI components. It covers Atomic Design methodology (atoms through pages), shadcn/ui setup and customization, Radix UI accessibility primitives, responsive design patterns, and component placement rules for monorepos.
From mnpx claudepluginhub molcajeteai/plugin --plugin mThis skill uses the workspace's default tool permissions.
references/atomic-design.mdreferences/radix-ui.mdreferences/responsive-design.mdreferences/shadcn-ui.mdSearches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Searches prompts.chat for AI prompt templates by keyword or category, retrieves by ID with variable handling, and improves prompts via AI. Use for discovering or enhancing prompts.
Creates persona-targeted CodeTour .tour files with real file and line anchors for onboarding, architecture, PR, RCA tours, and structured explanations.
Quick reference for building UI components with Atomic Design, shadcn/ui, and Radix UI. Each section summarizes the key rules — reference files provide full examples and edge cases.
Five-level component hierarchy: Atoms → Molecules → Organisms → Templates → Pages.
| Level | Breaks Down Further? | Fetches Data? | Business Logic? | Reusable? |
|---|---|---|---|---|
| Atom | No | No | No | Yes |
| Molecule | Into atoms | No | Minimal | Yes |
| Organism | Into molecules | Maybe | Yes | Usually |
| Template | Into organisms | No | No | Yes |
| Page | Into templates | Yes | Orchestration | No |
Button.tsx, FormField.tsxButton/, FormField/Button/__tests__/Button.test.tsxatoms/index.tsSee references/atomic-design.md for classification decision table, naming conventions, barrel exports, and anti-patterns.
components/web/src/ → Shared across apps (@drzum/ui)
├── atoms/ → @drzum/ui/atoms
├── molecules/ → @drzum/ui/molecules
├── organisms/ → @drzum/ui/organisms
├── templates/ → @drzum/ui/templates
└── chad-cn/ → Raw shadcn/ui copies
patient/src/components/ → Patient app only
├── atoms/
├── molecules/
├── organisms/
└── templates/
Decision flow:
components/web/ (shared){app}/src/components/ (app-specific){app}/src/pages/// ✅ Shared components
import { Button, Input } from "@drzum/ui/atoms";
import { FormField } from "@drzum/ui/molecules";
// ✅ App-specific components
import { AppointmentCard } from "@/components/organisms/AppointmentCard";
Copy-and-own component collection. Not a dependency — source code lives in your project.
pnpm dlx shadcn@latest add button input dialog
Modify the source directly — you own the code:
// Add a custom variant
const buttonVariants = cva("...", {
variants: {
variant: {
default: "bg-primary text-primary-foreground hover:bg-primary/90",
success: "bg-green-600 text-white hover:bg-green-700", // Custom
},
},
});
shadcn/ui uses CSS variables. Change your theme by updating variables in @theme:
@theme {
--color-primary: #16a34a;
--color-primary-foreground: #ffffff;
--color-destructive: #dc2626;
}
Wrap shadcn components with domain-specific behavior:
function LoadingButton({ isLoading, children, ...props }: LoadingButtonProps) {
return (
<Button disabled={isLoading} {...props}>
{isLoading && <Loader2 className="mr-2 size-4 animate-spin" />}
{isLoading ? "Cargando..." : children}
</Button>
);
}
See references/shadcn-ui.md for setup, configuration, form patterns with React Hook Form, and monorepo placement.
Accessible, unstyled primitives that shadcn/ui builds on. Key concepts:
asChild Pattern// Merges Radix behavior onto YOUR component
<Dialog.Trigger asChild>
<Button variant="outline">Abrir</Button>
</Dialog.Trigger>
Always use asChild when passing your own styled component as a Radix slot.
Radix exposes state via data attributes — use them for Tailwind styling:
<Tabs.Trigger
className="text-muted-foreground data-[state=active]:border-b-2 data-[state=active]:border-primary data-[state=active]:text-foreground"
>
Tab
</Tabs.Trigger>
Common: data-[state=open], data-[state=active], data-[state=checked], data-[disabled]
| Primitive | Use For | Key Behavior |
|---|---|---|
| Dialog | Modals, confirmations | Focus trap, Escape to close |
| DropdownMenu | Context menus | Arrow key navigation, type-ahead |
| Tabs | Tabbed content | Arrow keys between triggers |
| Select | Selection from options | Keyboard navigation, type-ahead |
| Tooltip | Hover information | Delay, accessible labels |
| Accordion | Collapsible sections | Single or multiple open |
Dialog.Title (use VisuallyHidden if not visible)asChild to avoid nesting <button> inside <button>aria-label for icon-only triggersSee references/radix-ui.md for Dialog, Dropdown, Tabs, Select, Tooltip examples and anti-patterns.
Mobile-first: base styles are mobile, breakpoints add larger-screen overrides.
| Prefix | Min Width | Target |
|---|---|---|
| (none) | 0px | Mobile (base) |
sm: | 640px | Large phones |
md: | 768px | Tablets |
lg: | 1024px | Laptops |
xl: | 1280px | Desktops |
{/* Stack → Row */}
<div className="flex flex-col gap-4 sm:flex-row">{/* ... */}</div>
{/* Responsive grid */}
<div className="grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3">{/* ... */}</div>
{/* Show/hide */}
<nav className="hidden lg:block">{desktopNav}</nav>
<button className="lg:hidden">{hamburger}</button>
Minimum 44x44px for interactive elements on mobile. Use h-11 (44px) as minimum button height.
sm:, md:, lg: to progressively enhanceuseMediaQuery only when component trees differ, not just layoutSee references/responsive-design.md for responsive tables, container queries, touch targets, and testing patterns.
When styling form elements, follow the project's design system:
focus-visible:border-primary focus-visible:ring-2 focus-visible:ring-primary/30 — green glow effectborder-border — light, subtleborder-destructive focus-visible:ring-destructive/30disabled:cursor-not-allowed disabled:opacity-50Reference .molcajete/research/ui-ideas/form-ui.png for the desired look and feel.
| File | Description |
|---|---|
| references/atomic-design.md | Five-level hierarchy, classification checklists, naming, barrel exports |
| references/shadcn-ui.md | Setup, adding components, customization, cva variants, theming |
| references/radix-ui.md | Dialog, Dropdown, Tabs, Select, Tooltip, accessibility |
| references/responsive-design.md | Mobile-first breakpoints, responsive patterns, touch targets, container queries |