Building UI Components with Shadcn ui
Shadcn/ui is not a traditional component library that you install as a dependency. Instead, it is a collection of reusable components that you copy and paste directly into your own codebase.
This "code ownership" model allows you to fully customize every part of the component without fighting against a hidden abstraction.
- Ownership: Since the code lives in your project, you own the API and logic. There is no
node_modulesdependency for the UI itself. - Headless Primitives: Most components are built on top of Radix UI or Base UI, which handle complex accessibility, keyboard navigation, and focus management.
Tailwind-First: Styling is handled via Tailwind CSS, making it easy to theme and scale using utility classes.
Latest Features (2026)
- Shadcn Create & v2: A major update introduced a New Project customizer that lets you select your preferred component library (Radix vs. Base UI), base colors, fonts, and icon sets (such as Huge Icons or Table Icons) before generating your project.
- AI-Native Workflow: The "open code" approach is designed to be highly compatible with AI coding agents such as v0 or Cursor, enabling them to read and refactor your local UI components accurately.
- Unified Primitive Support: You can now choose between Radix UI or the newer Base UI as the underlying engine for your blocks and components.
- Logical Property Support: The CLI automatically converts physical CSS properties (such as margins) to logical equivalents to support Right-to-Left (RTL) layouts natively.