moai-library-shadcn

Implements shadcn/ui components, CLI v4 workflows, and OKLCH theming for React applications.

2|Updated May 27, 2026
One-click install
npx skills add https://github.com/yekinya/moai-novel --skill moai-library-shadcn-yekinya
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: moai-library-shadcn
Source: https://github.com/yekinya/moai-novel/tree/main/moai-novel/.claude/skills/moai-library-shadcn
Command: npx skills add https://github.com/yekinya/moai-novel --skill moai-library-shadcn-yekinya

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Setting up and customizing shadcn/ui component libraries involves many moving parts—CLI configuration, preset selection, RTL support, unified radix-ui imports, and OKLCH theming—and mistakes break accessibility, dark mode, or keyboard navigation. ## Core Features & Use Cases - CLI v4 Workflows: Initialize projects with framework templates (Next.js, Vite, Astro, Laravel), apply presets, add components, and run migrations for radix-ui and RTL. - Component Patterns: Implement forms with react-hook-form and Zod, data tables with TanStack Table, compound components, and new 2026 components like Empty, Field, and Input Group. - Theming & RTL: Configure OKLCH color systems with CSS variables, dark mode, preset-based design systems, and logical CSS properties for right-to-left layouts. - Use Case: You are building a React dashboard that must support Arabic users and dark mode. Use this Skill to scaffold the project with the correct preset, migrate to logical CSS properties, and theme components with OKLCH variables. ## Quick Start Ask the AI to set up a shadcn/ui project with a preset, dark mode, and RTL support for your React application.

Frequently Asked Questions about moai-library-shadcn

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

FAQPage Schema
How do I set up shadcn/ui in a React project?

Run the shadcn/cli v4 init command, choose a framework template such as Next.js, Vite, or Astro, and optionally pass a preset code. The CLI generates components.json, configures Tailwind CSS, sets path aliases, and selects Radix UI or Base UI as the primitive library.

How do I migrate from @radix-ui packages to the unified radix-ui package?

Run the shadcn CLI migrate radix command. It rewrites imports like import * as DialogPrimitive from @radix-ui/react-dialog into direct named imports such as import { Dialog } from radix-ui across the project.

Does shadcn/ui support RTL languages like Arabic and Hebrew?

Yes, shadcn/ui provides first-class RTL support. The CLI converts physical CSS classes to logical equivalents at install time, and the migrate rtl command transforms existing projects. Positioned components also accept side values like inline-start and inline-end.

How do I validate shadcn/ui forms with react-hook-form and Zod?

Define a Zod schema with z.object, infer the form values type, and pass zodResolver(schema) to useForm. Wire the form element through form.handleSubmit so validation errors map to each field automatically.

What is the difference between OKLCH and HSL theming in shadcn/ui?

OKLCH replaces HSL as the default color system in shadcn/cli v4, offering perceptually uniform lightness and wider gamut. Only the CSS variable definitions in globals.css change; component code stays identical, and HSL themes continue to work.

Why does my customized shadcn component lose keyboard navigation?

Keyboard navigation comes from the underlying Radix UI primitives. If customization removes or overrides those primitives, Tab, Enter, Escape, and arrow-key behavior breaks. Preserve the primitive structure and modify only styling layers.