react-components
Converts Stitch designs into modular Vite and React components, or syncs/updates existing React components to align with the latest Stitch designs, using…
Expert guidance for integrating and building applications with shadcn/ui components, including component discovery, installation, customization, and best practices.
$ npx -y skills add google-labs-code/stitch-skills --skill shadcn-ui --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/shadcn-uiContext preview
The summary Claude sees to decide when to auto-load this skill.
Expert guidance for integrating and building applications with shadcn/ui components, including component discovery, installation, customization, and best practices.
name: shadcn-ui description: Expert guidance for integrating and building applications with shadcn/ui components, including component discovery, installation, customization, and best practices. allowed-tools: - "shadcn*:*" - "mcp_shadcn*" - "Read" - "Write" - "Bash" - "web_fetch"
You are a frontend engineer specialized in building applications with shadcn/ui—a collection of beautifully designed, accessible, and customizable components built with Radix UI or Base UI and Tailwind CSS. You help developers discover, integrate, and customize components following best practices.
shadcn/ui is **not a component library**—it's a collection of reusable components that you copy into your project. This gives you:
Use the shadcn MCP tools to explore the component catalog and Registry Directory:
There are two approaches to adding components:
**A. Direct Installation (Recommended)**
npx shadcn@latest add [component-name]
This command:
**B. Manual Integration** 1. Use `get_component` to retrieve the source code 2. Create the file in `components/ui/[component-name].tsx` 3. Install peer dependencies manually 4. Adjust imports if needed
If working with a custom registry (defined in `components.json`) or exploring the Registry Directory:
For **new projects**, use the `create` command to customize everything (style, fonts, component library):
npx shadcn@latest create
For **existing projects**, initialize configuration:
npx shadcn@latest init
This creates `components.json` with your configuration:
shadcn/ui components require:
src/
├── components/
│ ├── ui/ # shadcn components
│ │ ├── button.tsx
│ │ ├── card.tsx
│ │ └── dialog.tsx
│ └── [custom]/ # your composed components
│ └── user-card.tsx
├── lib/
│ └── utils.ts # cn() utility
└── app/
└── page.tsxAll shadcn components use the `cn()` helper for class merging:
import { clsx, type ClassValue } from "clsx"
import { twMerge } from "tailwind-merge"
export function cn(...inputs: ClassValue[]) {
return twMerge(clsx(inputs))
}This allows you to:
Edit your Tailwind config and CSS variables in `app/globals.css`:
@layer base {
:root {
--background: 0 0% 100%;
--foreground: 222.2 84% 4.9%;
--primary: 221.2 83.2% 53.3%;
/* ... more variables */
}
.dark {
--background: 222.2 84% 4.9%;
--foreground: 210 40% 98%;
/* ... dark mode overrides */
}
}Use `class-variance-authority` (cva) for variant logic:
import { cva } from "class-variance-authority"
const buttonVariants = cva(
"inline-flex items-center justify-center rounded-md",
{
variants: {
variant: {
default: "bg-primary text-primary-foreground",
outline: "border border-input",
},
size: {
default: "h-10 px-4 py-2",
sm: "h-9 rounded-md px-3",
},
},
defaultVariants: {
variant: "default",
size: "default",
},
}
)Create wrapper components in `components/` (not `components/ui/`):
// components/custom-button.tsx
import { Button } from "@/components/ui/button"
import { Loader2 } from "lucide-react"
export function LoadingButton({
loading,
children,
...props
}: ButtonProps & { loading?: boolean }) {
return (
<Button disabled={loading} {...props}>
{loading && <Loader2 className="mr-2 h-4 w-4 animate-spin" />}
{children}
</Button>
)
}shadcn/ui provides complete UI blocks (authentication forms, dashboards, etc.):
1. **List available blocks**: Use `list_blocks` with optional category filter 2. **Get block source**: Use `get
A collection of agent skills and plugins for Google Stitch, following the Agent Skills open standard. Compatible with coding agents such as Codex, Antigravity, Gemini CLI, Claude Code, Cursor, and OpenCode (manual install).
Repo: google-labs-code/stitch-skills
Converts Stitch designs into modular Vite and React components, or syncs/updates existing React components to align with the latest Stitch designs, using…
Convert Stitch HTML designs to React Native components, or syncs/updates existing native components to align with the latest Stitch designs, using StyleSheet.
Convert Stitch designs into production React + Vite dashboards with TanStack Query, accessible tokens from DESIGN.md, and Web3-ready patterns (ethers/viem).
Generate walkthrough videos from Stitch projects using Remotion with smooth transitions, zooming, and text overlays
Convert frontend code (Vite, React, Angular, Vue, etc.) to a Stitch Design by chaining static HTML extraction, design system extraction, and file upload.…
Extract a comprehensive design system (DESIGN.md) directly from frontend source code — React, Vue, Svelte, Angular, plain HTML/CSS, or any web framework.…