setup-react-native-sto…
Set up Storybook for React Native in Expo, React Native CLI, or Re.Pack projects. Use when adding Storybook to a project,…
Create and edit React Native Storybook stories using Component Story Format (CSF). Use when writing .stories.tsx files, adding stories to React Native components, configuring Storybook addons (controls, actions, backgrounds, notes), setting up argTypes, decorators, parameters,
Claude Code
$ npx -y skills add storybookjs/react-native --skill writing-react-native-storybook-stories --agent claude-code
Codex
$ npx skills add storybookjs/react-native --skill writing-react-native-storybook-stories -a codex -y
Cursor
$ npx skills add storybookjs/react-native --skill writing-react-native-storybook-stories -a cursor -y
Gemini CLI
$ npx skills add storybookjs/react-native --skill writing-react-native-storybook-stories -a gemini-cli -y
GitHub Copilot
$ npx skills add storybookjs/react-native --skill writing-react-native-storybook-stories -a github-copilot -y
OpenCode
$ npx skills add storybookjs/react-native --skill writing-react-native-storybook-stories -a opencode -y
Windsurf
$ npx skills add storybookjs/react-native --skill writing-react-native-storybook-stories -a windsurf -y
name: writing-react-native-storybook-stories description: Create and edit React Native Storybook stories using Component Story Format (CSF). Use when writing .stories.tsx files, adding stories to React Native components, configuring Storybook addons (controls, actions, backgrounds, notes), setting up argTypes, decorators, parameters, or working with portable stories for testing. Applies to any task involving @storybook/react-native story authoring.
Write stories for React Native components using `@storybook/react-native` v10 and Component Story Format (CSF).
Minimal story file:
import type { Meta, StoryObj } from '@storybook/react-native';
import { MyComponent } from './MyComponent';
const meta = {
component: MyComponent,
} satisfies Meta<typeof MyComponent>;
export default meta;
type Story = StoryObj<typeof meta>;
export const Basic: Story = {
args: {
label: 'Hello',
},
};export const Primary: Story = {
args: { variant: 'primary', title: 'Click me' },
};
export const Secondary: Story = {
args: { ...Primary.args, variant: 'secondary' },
};export const WithScrollView: Story = {
render: (args) => (
<ScrollView>
<MyComponent {...args} />
</ScrollView>
),
};export const Interactive: Story = {
render: function InteractiveRender() {
const [count, setCount] = useReducer((s) => s + 1, 0);
return <Counter count={count} onPress={setCount} />;
},
};import { fn } from 'storybook/test';
const meta = {
component: Button,
args: { onPress: fn() },
} satisfies Meta<typeof Button>;Or via argTypes:
argTypes: { onPress: { action: 'pressed' } },export const MyStory: Story = {
storyName: 'Custom Display Name',
args: { label: 'Hello' },
};const meta = {
title: 'NestingExample/Message/Bubble',
component: MyComponent,
} satisfies Meta<typeof MyComponent>;For the full control type reference, see [references/controls.md](references/controls.md).
Common patterns:
const meta = {
component: MyComponent,
argTypes: {
// Select dropdown
size: {
options: ['small', 'medium', 'large'],
control: { type: 'select' },
},
// Range slider
opacity: {
control: { type: 'range', min: 0, max: 1, step: 0.1 },
},
// Color picker
color: { control: { type: 'color' } },
// Conditional control (shows only when `advanced` arg is true)
padding: { control: 'number', if: { arg: 'advanced' } },
},
} satisfies Meta<typeof MyComponent>;Auto-detection: TypeScript prop types are automatically mapped to controls (`string` -> text, `boolean` -> boolean, union types -> select, `number` -> number).
parameters: {
// Markdown docs in the Notes addon tab
notes: `# MyComponent\nUsage: \`<MyComponent label="hi" />\``,
// Background options for Backgrounds addon
backgrounds: {
default: 'dark',
values: [
{ name: 'light', value: 'white' },
{ name: 'dark', value: '#333' },
],
},
},| Parameter | Type | Description | | ----------------------- | -------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `noSafeArea` | `boolean` | Remove top safe area padding. **When using this, the component itself must handle safe areas** since Storybook will no longer provide safe area padding. Prefer `useSafeAreaInsets()` over `SafeAreaView` — apply insets as `paddingTop`/`paddingBottom` on the container, and for scrollable content use `contentContainerStyle` padding instead of wrapping in `SafeAreaView`. | | `storybookUIVisibility` | `'visible'` \| `'hidden'` | Initial UI visibility | | `hideFullScreenButton` | `boolean` | Hide fullscreen toggle
A new docs site is being built for Storybook for React Native, you can find it at With Storybook for React Native you can design and develop individual React Native components without running your app.
Set up Storybook for React Native in Expo, React Native CLI, or Re.Pack projects. Use when adding Storybook to a project,…
Incrementally upgrade React Native Storybook across the supported migration paths. Use when upgrading `@storybook/react-native`…
Decompile Android APK, XAPK, JAR, and AAR files using jadx or Fernflower/Vineflower. Reverse engineer Android apps, extract HTTP…