Join us live: Rapid Frontend Prototyping with Cursor & Storybook
Docs
Storybook Docs

docs

Parent: main.js|ts configuration

Type:

{
  defaultName?: string;
  docsMode?: boolean;
}

Configures Storybook's auto-generated documentation.

defaultName

Type: string

Default: 'Docs'

Name used for generated documentation pages.

.storybook/main.ts
// Replace your-framework with the framework you are using, e.g. react-vite, nextjs, vue3-vite, etc.
import type { StorybookConfig } from '@storybook/your-framework';
 
const config: StorybookConfig = {
  framework: '@storybook/your-framework',
  stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
  docs: {
    defaultName: 'Documentation',
  },
};
 
export default config;

docsMode

Type: boolean

Only show documentation pages in the sidebar (usually set with the --docs CLI flag).

.storybook/main.ts
// Replace your-framework with the framework you are using, e.g. react-vite, nextjs, vue3-vite, etc.
import type { StorybookConfig } from '@storybook/your-framework';
 
const config: StorybookConfig = {
  framework: '@storybook/your-framework',
  stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
  docs: {
    docsMode: true,
  },
};
 
export default config;