ui-components

Enforces consistent use of Radix UI and shadcn components with Tailwind CSS in React interfaces.

Updated Aug 19, 2026
One-click install
npx skills add https://github.com/homeslands/trend-ui --skill ui-components-homeslands
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ui-components
Source: https://github.com/homeslands/trend-ui/tree/main/app/order-ui/.claude/skills/ui-components
Command: npx skills add https://github.com/homeslands/trend-ui --skill ui-components-homeslands

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Building UI in this project often leads to inconsistent patterns: developers re-create existing components, hardcode colors, or misuse form libraries. This Skill ensures every form, dialog, table, and layout follows the project's established Radix UI + shadcn + Tailwind CSS component system. ## Core Features & Use Cases - Component Library Reference: Documents all atomic components in src/components/ui/ (Button, Dialog, Form, DataTable, Select, Tabs, etc.) with correct import paths and usage patterns. - Form Patterns: Provides the canonical react-hook-form + Zod + shadcn Form integration pattern, including mutation handling with loading states. - Enforced Rules: Mandates cn() from @/lib/utils for class merging, Tailwind design tokens instead of hardcoded colors, and FormField/FormControl instead of raw inputs. - Use Case: When asked to add a "Create Printer" dialog with a validated form, the Skill guides you to compose Dialog, Form, Input, and Button from the existing UI library with proper loading states and Zod validation. ## Quick Start Build a new dialog containing a validated form for creating a printer using the project's existing UI component library.

Frequently Asked Questions about ui-components

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

FAQPage Schema
How do I build a form with react-hook-form and shadcn components?

Use useForm with zodResolver for schema validation, then wrap fields in Form, FormField, FormItem, FormLabel, FormControl, and FormMessage from the ui/form component. Never use raw input elements with register directly.

How do I create a data table with Tanstack Table in React?

Define ColumnDef columns outside the component or with useMemo, then pass them with your data to the DataTable component from src/components/ui/data-table. Inline column definitions cause unnecessary re-renders on every render.

Should I install Radix UI primitives directly in a shadcn project?

No, always use the wrapped components in src/components/ui/ instead of installing raw Radix primitives. New primitives should be added to that directory following the shadcn pattern of Radix plus CVA plus the cn utility.

How do I merge Tailwind classes conditionally in React?

Use the cn() utility imported from @/lib/utils, which safely merges Tailwind classes including conditional expressions. Avoid string concatenation, which can produce conflicting or malformed class names.

Why should I avoid hardcoded colors in Tailwind components?

Hardcoded colors break theming and dark mode support. Use Tailwind design tokens like bg-primary and text-destructive so components adapt to the project's theme automatically.