shadcn-ui

Implements shadcn/ui component patterns for Next.js and TypeScript applications.

Updated Jul 29, 2026
One-click install
npx skills add https://github.com/MaiconGambini/opencode-harness-guide --skill shadcn-ui-maicongambini
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: shadcn-ui
Source: https://github.com/MaiconGambini/opencode-harness-guide/tree/main/skills/shadcn-ui
Command: npx skills add https://github.com/MaiconGambini/opencode-harness-guide --skill shadcn-ui-maicongambini

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Building consistent, accessible UIs in Next.js often means choosing between rigid component libraries and writing everything from scratch. This Skill provides production-grade patterns for shadcn/ui, where components are copied into your codebase so you own and customize them directly. ## Core Features & Use Cases - Component Architecture: Canonical file structure separating auto-generated ui/ components from your composed business components, with the cn() utility for class merging. - Theming & Dark Mode: CSS variable-based theming with next-themes integration and custom brand color extension via Tailwind config. - Forms & Data Tables: Standard patterns for React Hook Form + Zod validation and TanStack Table-based data tables with sorting, filtering, and pagination. - Use Case: You are building a Next.js dashboard and need an accessible data table with a confirmation dialog and validated forms. This Skill guides you to install the right components via CLI, compose them correctly, and keep dark mode and keyboard navigation working. ## Quick Start Ask the AI to scaffold a shadcn/ui form with React Hook Form and Zod validation for your Next.js project.

Frequently Asked Questions about shadcn-ui

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

FAQPage Schema
How do I add shadcn/ui components to a Next.js project?

Run npx shadcn@latest init to configure the project, then add components with npx shadcn@latest add <component>. Components are copied into src/components/ui/ so you own the source code rather than installing an npm dependency.

How do I build forms with shadcn/ui and Zod validation?

Use React Hook Form with zodResolver and a Zod schema, wrapping inputs in the Form, FormField, FormItem, FormLabel, and FormMessage components. Derive TypeScript types with z.infer so the schema is the single source of truth.

Does shadcn/ui support dark mode in Next.js?

Yes, shadcn/ui uses CSS variables for theming with a .dark class override. Integrate next-themes via a ThemeProvider client component with attribute="class" and enableSystem for automatic dark mode switching.

shadcn/ui vs MUI or Chakra UI, which should I use?

shadcn/ui copies components into your codebase for full ownership and Tailwind-native styling, while MUI and Chakra are installed dependencies with their own styling systems. This Skill explicitly does not apply to MUI or Chakra projects.

Should I modify files in the shadcn ui/ components directory?

Avoid modifying ui/ components unless intentionally customizing the base component. For custom behavior, compose new components in a composed/ directory that wrap the ui/ primitives, keeping base components close to their original form.