Shadcn

Use when: add, customize, or extend shadcn/ui components with correct Tailwind and theming setup.

kimtth 914f4b3 1.1 KB Updated

File contents

Goal: use shadcn/ui as owned source, customized cleanly.

Use for:

  • installing and wiring shadcn/ui components
  • customizing styling, variants, and theme tokens
  • composing primitives into app-specific components

Workflow:

  1. Initialize shadcn and confirm Tailwind + path aliases.
  2. Add only the components you need via the CLI.
  3. Treat generated files as your code; edit them directly.
  4. Customize via theme CSS variables and component variants.
  5. Compose primitives into higher-level app components.
  6. Re-add or diff carefully when upgrading components.

Patterns:

  • own the component code; do not fight the abstraction
  • theme through CSS variables, not per-instance overrides
  • extend variants with the existing variant helper
  • keep accessibility props from the primitives intact

Rules:

  • customize in the component source, not with override hacks
  • keep the design-token layer as the single source of truth
  • do not hand-edit in ways that block future updates blindly
  • preserve the underlying primitive's a11y behavior

kimtth/agent-skill-100-lines-or-less/tree/main/skills/shadcn commit 914f4b3c19

Frequently asked questions

npx skillmds@latest add kimtth/shadcn