strapi/website · Archived

shadcn-ui

Expert guidance for integrating shadcn/ui components in this Next.js monorepo (apps/ui).

First seen Jun 25, 2026

Installation

$ npx skills add strapi/website --skill shadcn-ui

Summary

  • Expert guidance for integrating shadcn/ui components in this Next.js monorepo (apps/ui).
  • Handles component discovery, installation via CLI, customization to local conventions (cn() in @/lib/styles, Tailwind v4, radix-ui primitives), and best practices.
  • Use this skill whenever the user wants to add, install, customize, or troubleshoot a shadcn/ui component — even if they just say 'add a button' or 'install tabs'.
  • Also triggers on: shadcn, radix, UI component, cn utility, component library.

Stronger alternatives

This repository is archived — consider an actively maintained alternative.

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from strapi/website.

npx skills add strapi/website

Browse all from strapi/website

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Repository health

Stars 4
License LICENSE
Default branch main
Open issues 12
Status Archived

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 4,137 B
  • docs SUMMARY.md 512 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 2 installs

SKILL.md

shadcn/ui Essentials (Repo-Specific)

Use this skill to add or adapt shadcn/ui components in this monorepo without fighting local conventions.

Scope

  • Focus on apps/ui.
  • Keep instructions lean and stable.
  • Use official shadcn docs for evolving details instead of copying full docs into this skill

Source of Truth

Read these files first in the target repo:

  • apps/ui/components.json
  • apps/ui/package.json
  • apps/ui/src/lib/styles.ts
  • apps/ui/src/styles/globals.css

Current repo conventions to preserve:

  • cn() lives in @/lib/styles (not @/lib/utils).
  • UI components are in apps/ui/src/components/ui.
  • Aliases are defined in apps/ui/components.json.
  • Existing primitives commonly import from the radix-ui package in this repo.
  • Tailwind is configured for v4-style CSS entry (components.json.tailwind.css).

Workflow

  1. Confirm target component(s) and whether this is add vs. refactor.
  2. Run shadcn CLI from apps/ui:

- pnpm dlx shadcn@latest add <component>

  1. Run the post-install fixup checklist (see below).
  2. Integrate component usage where requested.
  3. Validate:

- pnpm --filter @repo/ui typecheck - pnpm --filter @repo/ui lint

Post-Install Fixup Checklist

After shadcn add, review generated files for these common issues:

  1. cn() import path: The CLI should generate @/lib/styles (aliased in components.json). If it generates @/lib/utils, fix the import. This is the most common issue after shadcn upgrades.
  2. Radix imports: This repo uses the unified radix-ui package. If generated code imports from @radix-ui/react-* (scoped packages), convert to radix-ui imports unless both coexist in package.json.
  3. Tailwind v4 CSS variables: Shadcn v4 components use CSS custom properties (--radius, --primary, etc.) defined in apps/ui/src/styles/globals.css. Verify new components reference variables that exist in globals.css — add missing ones if needed.
  4. "use client" directive: Shadcn components with interactivity include "use client". Keep it — this is a React Server Components project.
  5. Naming conflicts: Check apps/ui/src/components/ui/ for existing files before adding. If a component already exists, diff and merge rather than overwrite.

Common Pitfalls

  • Don't use tailwind.config.js: This project uses Tailwind v4 with CSS-based config (src/styles/globals.css). Theme tokens live in packages/design-system/src/theme.css. Never create or reference a JS config file.
  • Don't install duplicate primitives: Before adding a shadcn component that depends on a Radix primitive, check if that primitive is already installed. Run pnpm --filter @repo/ui list radix-ui to check.
  • Don't override design system tokens: Shadcn components may define their own color/spacing variables. Always prefer existing tokens from packages/design-system/src/theme.css over shadcn defaults.

Guardrails

  • Do not paste frozen dependency matrices into this skill.
  • Do not assume old Tailwind v3 config patterns (tailwind.config.js, @tailwind base blocks).
  • Do not force conversion between radix-ui, @radix-ui/*, or Base UI unless user requests migration.
  • Follow existing codebase patterns over generic shadcn examples.

Official References