Use when configuring interactive controls and args for Storybook stories. Helps create dynamic, explorable component demonstrations with proper type constraints.
View on GitHubTheBushidoCollective/han
jutsu-storybook
January 24, 2026
Select agents to install to:
npx add-skill https://github.com/TheBushidoCollective/han/blob/main/jutsu/jutsu-storybook/skills/storybook-args-controls/SKILL.md -a claude-code --skill storybook-args-controlsInstallation paths:
.claude/skills/storybook-args-controls/# Storybook - Args and Controls
Configure interactive controls and args to make stories dynamic and explorable, allowing designers and developers to test component variations in real-time.
## Key Concepts
### Args
Args are inputs to components that Storybook tracks and makes interactive:
```typescript
export const Primary: Story = {
args: {
label: 'Button',
primary: true,
size: 'medium',
onClick: () => alert('clicked'),
},
};
```
### ArgTypes
ArgTypes define metadata about args, including control types and documentation:
```typescript
const meta = {
component: Button,
argTypes: {
backgroundColor: {
control: 'color',
description: 'Background color of the button',
},
size: {
control: { type: 'select' },
options: ['small', 'medium', 'large'],
description: 'Size variant',
},
onClick: {
action: 'clicked',
},
},
} satisfies Meta<typeof Button>;
```
### Control Types
Storybook provides various control types for different data types:
- `text` - String input
- `number` - Number input with validation
- `boolean` - Checkbox toggle
- `color` - Color picker
- `date` - Date picker
- `select` - Dropdown menu
- `radio` - Radio buttons
- `range` - Slider with min/max
- `object` - JSON editor
- `array` - Array editor
## Best Practices
### 1. Infer Controls from TypeScript
Let Storybook auto-generate controls from TypeScript types:
```typescript
interface ButtonProps {
label: string;
primary?: boolean;
size?: 'small' | 'medium' | 'large';
backgroundColor?: string;
onClick?: () => void;
}
export const Button: React.FC<ButtonProps> = ({ ... }) => { ... };
const meta = {
component: Button,
// Controls inferred from ButtonProps
} satisfies Meta<typeof Button>;
```
### 2. Customize Control Types When Needed
Override auto-inferred controls for better UX:
```typescript
const meta = {
component: ColorPicker,
argTypes: {
color: {
control: 'color', // Override d