Component Story Format
Storybook's file format for stories: a default export describing the component and named exports, each a story object.
In more detail
CSF3 stories are plain objects with args instead of render functions, so a story can be as short as export const Primary = { args: { label: "Buy" } }. Being plain JavaScript, stories can also be imported into other tests.
Related terms
- Storybook — An open-source workshop where you develop, view and test components in isolation, one story per state.
- story — In Storybook, one saved example of a component in a particular state, such as Button in its primary or loading state.
- args — The props a Storybook story passes to its component, which Storybook turns into editable controls.
Taught in
- Storybook & Component Driven Development Workflows — Design Systems & Component Engineering