Create storybook docs

From leboncoin/spark-web · View interactive version

Create storybook docs is an AI agent skill from the GitHub repository leboncoin/spark-web. Create or update Storybook stories and documentation for a Spark UI component. Use when the user wants to add stories, update documentation, or improve component documentation in Storybook.

How to use this skill

Skill file

Create Storybook Documentation

Create or update Storybook stories and MDX documentation for Spark UI components.

When to Use

Instructions

Stories File (`ComponentName.stories.tsx`)

  1. Meta Definition:

```tsx

const meta: Meta<typeof ComponentName> = {

title: 'Components/ComponentName',

component: ComponentName,

}

export default meta

```

  1. Story Guidelines:
  1. Required Stories (in order):

Documentation File (`ComponentName.doc.mdx`)

  1. Sections Order (must follow this exact order):
  1. Usage Section Format:

```mdx

## Usage

### Default

<Canvas of={stories.Default} />

### Uncontrolled

Description of uncontrolled usage.

<Canvas of={stories.Uncontrolled} />

### Controlled

Description of controlled usage.

<Canvas of={stories.Controlled} />

```

  1. For Compound Components:

Reference

See documentation/contributing/WritingStories.mdx for complete guidelines.

Examples

Reference existing stories in packages/components/src/*/ComponentName.stories.tsx and ComponentName.doc.mdx.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.