Install
openclaw skills install storybookBuild component stories with proper args, controls, decorators, and testing patterns.
openclaw skills install storybooksatisfies Meta<typeof Component> for TypeScript type checkingexport const Primary = { args: {...} }args are actual prop values passed to component—args: { label: 'Click me' }argTypes configure controls UI—argTypes: { size: { control: 'select', options: ['sm', 'lg'] } }argTypes: { onClick: { action: 'clicked' } } logs events in Actions panelargTypes: { color: { control: 'color' } }argTypes: { children: { control: false } }control: { type: 'select' }, options: ['a', 'b', 'c']decorators: [(Story) => <Provider><Story /></Provider>].storybook/preview.js: applies to all storiesplay: async ({ canvasElement }) => {...}@storybook/testing-library for queries—within(canvasElement).getByRole()await userEvent.click(button) for interactionsexpect(element).toBeVisible() for assertions—tests run in browserargTypes: { onClick: { action: 'clicked' } } auto-logs to Actions panelimport { action } from '@storybook/addon-actions'fn() from @storybook/test in Storybook 8+ for spying in play functionstitle: 'Components/Forms/Button'tags: ['autodocs'] generates docs page automaticallyparameters: { docs: { description: { story: 'text' } } } adds story descriptionexport const Default = {}export const WithIcon = { args: { icon: <Icon /> } }render: (args) => <Wrapper><Component {...args} /></Wrapper>render: (args, { globals }) => ....storybook/main.js: addons, framework, stories glob patterns.storybook/preview.js: global decorators, parameters, argTypesstories: ['../src/**/*.stories.@(js|jsx|ts|tsx)']staticDirs: ['../public'] for images/fontsstoriesOf API—deprecated, use CSF exportsStory without calling it: (Story) => <Story /> not (Story) => Story