Storybook Csf Structure
Documentation of the Component Story Format used in Storybook story files (.stories.js/ts/jsx/tsx)
Type: module
Properties: 0
Accessibility TestingComponent DocumentationComponent TestingDesign SystemsFront-End DevelopmentOpen-SourceReactUI ComponentsVisual Testing
Storybook Csf Structure is a JSON Structure definition published by Storybook.
{
"title": "Storybook CSF (Component Story Format) File Structure",
"description": "Documentation of the Component Story Format used in Storybook story files (.stories.js/ts/jsx/tsx)",
"type": "module",
"sections": [
{
"name": "Default Export (Meta)",
"description": "The default export is the component meta, defining the component and shared configuration",
"fields": [
{ "name": "title", "type": "string", "description": "Sidebar path like 'Components/Button'. Optional with auto-title." },
{ "name": "component", "type": "Component", "description": "The component being documented", "required": true },
{ "name": "tags", "type": "string[]", "description": "['autodocs'] enables auto-generated docs page" },
{ "name": "args", "type": "object", "description": "Default arg values for all stories" },
{ "name": "argTypes", "type": "object", "description": "ArgType configurations for Controls panel" },
{ "name": "parameters", "type": "object", "description": "Shared parameters (layout, backgrounds, etc.)" },
{ "name": "decorators", "type": "Decorator[]", "description": "Wrapper functions applied to all stories" }
]
},
{
"name": "Named Exports (Stories)",
"description": "Each named export is a story representing a component state",
"fields": [
{ "name": "args", "type": "object", "description": "Story-specific arg values overriding defaults" },
{ "name": "parameters", "type": "object", "description": "Story-specific parameter overrides" },
{ "name": "play", "type": "async function", "description": "Interaction test function using @storybook/test" },
{ "name": "name", "type": "string", "description": "Custom story display name (defaults to export name)" },
{ "name": "decorators", "type": "Decorator[]", "description": "Story-specific decorator wrappers" },
{ "name": "tags", "type": "string[]", "description": "Story-specific tags" },
{ "name": "loaders", "type": "Loader[]", "description": "Async data loading functions" }
]
},
{
"name": "Story Render Patterns",
"description": "How stories are rendered in CSF",
"patterns": [
{
"name": "Default render (no render function)",
"description": "Component is rendered directly with args as props",
"example": "export const Primary = { args: { label: 'Button', variant: 'primary' } }"
},
{
"name": "Custom render function",
"description": "Story provides a custom render function for complex setups",
"example": "export const WithProvider = { render: (args) => <Provider><Button {...args} /></Provider> }"
},
{
"name": "Interaction test story",
"description": "Story with play function for automated interaction testing",
"example": "export const Filled = { play: async ({ canvasElement }) => { await userEvent.click(screen.getByRole('button')) } }"
}
]
}
]
}
Every JSON Structure here is available over the APIs.io API and to AI agents over MCP.
MCP server
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
Tools for json structure
4 MCP tools reach this
find_json_structuresBrowse and filter every JSON Structure in the catalog.
apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
resolveTurn a domain, URL or GitHub org into the provider it belongs to.
find_cohortsEvery scored population of providers in the catalog.
All 92 tools
Call it yourself
curl for this page
This JSON Structure
curl "https://apis.io/api/v1/json-structures/storybook-csf-structure"
All json structure
curl "https://apis.io/api/v1/json-structures?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
Get an API key
Free tier, no email required.
A second provider on the same verified email joins the account you already have.