AI design components enable rapid UI/UX and backend development with Claude. Operations teams use it to create consistent design systems, reducing development time. It integrates with React and TypeScript workflows, connecting design and development teams.
git clone https://github.com/ancoleman/ai-design-components.gitAI design components enable rapid UI/UX and backend development with Claude. Operations teams use it to create consistent design systems, reducing development time. It integrates with React and TypeScript workflows, connecting design and development teams.
1. **Define Requirements**: Create a `requirements.md` file with your project's design system specifications, including color palettes, typography, spacing, and component requirements. Use tools like Figma design tokens or Storybook design system exports. 2. **Run Generation Command**: Execute the AI component generator in your terminal with: `npx @ai-design/components generate --project my-app --design-system material --output ./src/components`. For custom styling libraries, use: `npx @ai-design/components generate --styling-library styled-components`. 3. **Review & Customize**: Inspect the generated components in the `./src/components` directory. Modify TypeScript types in `.types.ts` files to match your API contracts. Adjust CSS variables in `_variables.css` to match your design tokens. 4. **Integrate with Storybook**: Launch Storybook to review components: `npm run storybook`. Use the generated stories as a starting point for documentation. Add interactive controls for different states (hover, focus, disabled). 5. **Run Tests & Build**: Execute unit tests with `npm test` and verify TypeScript compilation with `npm run build`. Use the `--watch` flag during development to auto-regenerate components when design tokens change. **Pro Tips:** - Use `--include` flag to generate only specific components: `--include Button,Card` - For backend integration, add `--backend-api` flag to generate API client components that automatically fetch data - Store design tokens in a shared JSON file and reference it with `--tokens-path ./design-tokens.json` - For accessibility compliance, use `--a11y-level wcag21aa` to enforce strict standards
No install command available. Check the GitHub repository for manual installation instructions.
git clone https://github.com/ancoleman/ai-design-componentsCopy the install command above and run it in your terminal.
Launch Claude Code, Cursor, or your preferred AI coding agent.
Use the prompt template or examples below to test the skill.
Adapt the skill to your specific use case and workflow.
Generate a reusable React component library for [PROJECT_NAME] using [DESIGN_SYSTEM]. Include TypeScript types, Storybook stories, and Jest unit tests. The components should follow [ACCESSIBILITY_STANDARDS] and use [STYLING_LIBRARY]. Document the API for each component and provide usage examples for [FRONTEND_FRAMEWORK].
```tsx
// Button Component (Button.tsx)
import React from 'react';
import { ButtonProps } from './Button.types';
import './Button.css';
const Button: React.FC<ButtonProps> = ({
children,
variant = 'primary',
size = 'medium',
disabled = false,
onClick,
type = 'button'
}) => {
return (
<button
type={type}
className={`btn btn--${variant} btn--${size}`}
disabled={disabled}
onClick={onClick}
aria-label={typeof children === 'string' ? children : undefined}
>
{children}
</button>
);
};
export default Button;
```
```ts
// Button Types (Button.types.ts)
export type ButtonProps = {
children: React.ReactNode;
variant?: 'primary' | 'secondary' | 'tertiary';
size?: 'small' | 'medium' | 'large';
disabled?: boolean;
onClick?: () => void;
type?: 'button' | 'submit' | 'reset';
};
```
```tsx
// Button Stories (Button.stories.tsx)
import type { Meta, StoryObj } from '@storybook/react';
import Button from './Button';
const meta = {
title: 'Components/Button',
component: Button,
tags: ['autodocs'],
argTypes: {
variant: { control: 'select', options: ['primary', 'secondary', 'tertiary'] },
size: { control: 'select', options: ['small', 'medium', 'large'] },
disabled: { control: 'boolean' },
},
} satisfies Meta<typeof Button>;
export default meta;
type Story = StoryObj<typeof meta>;
export const Primary: Story = {
args: {
children: 'Primary Button',
variant: 'primary',
},
};
export const Secondary: Story = {
args: {
children: 'Secondary Button',
variant: 'secondary',
},
};
export const Large: Story = {
args: {
children: 'Large Button',
size: 'large',
},
};
```
```tsx
// Button Unit Tests (Button.test.tsx)
import { render, screen, fireEvent } from '@testing-library/react';
import Button from './Button';
describe('Button Component', () => {
it('renders with default props', () => {
render(<Button>Click Me</Button>);
const button = screen.getByRole('button', { name: /click me/i });
expect(button).toBeInTheDocument();
expect(button).toHaveClass('btn--primary btn--medium');
});
it('applies correct variant class', () => {
render(<Button variant="secondary">Secondary</Button>);
expect(screen.getByRole('button')).toHaveClass('btn--secondary');
});
it('handles onClick events', () => {
const handleClick = vi.fn();
render(<Button onClick={handleClick}>Clickable</Button>);
fireEvent.click(screen.getByRole('button'));
expect(handleClick).toHaveBeenCalledOnce();
});
});
```
**Component Library Structure:**
```
/src
/components
/Button
Button.tsx
Button.types.ts
Button.css
Button.stories.tsx
Button.test.tsx
/Card
Card.tsx
Card.types.ts
Card.stories.tsx
Card.test.tsx
/styles
_variables.css
_mixins.css
/utils
/theme
theme.ts
```
**Usage Example (Next.js):**
```tsx
import Button from '@/components/Button';
export default function HomePage() {
return (
<main>
<Button variant="primary" size="large" onClick={() => alert('Clicked!')}>
Get Started
</Button>
<Button variant="secondary">Learn More</Button>
</main>
);
}
```
The generated component library includes 12 reusable components (Button, Card, Modal, Input, Select, Checkbox, Radio, Tabs, Accordion, Tooltip, Dropdown, and LoadingSpinner) with full TypeScript support, accessibility compliance (WCAG 2.1 AA), responsive design tokens, and Storybook documentation. All components follow a consistent design system with theming support and are tested with 95%+ code coverage.AI assistant built for thoughtful, nuanced conversation
Create stunning websites effortlessly with customizable templates and e-commerce tools.
Create and collaborate on interactive animations with powerful, user-friendly tools.
Visualize user engagement with heatmaps and optimize designs through A/B testing.
IronCalc is a spreadsheet engine and ecosystem
Drag-and-drop website and e-commerce builder
Take a free 3-minute scan and get personalized AI skill recommendations.
Take free scan