Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@storybook/addon-docs

Package Overview
Dependencies
Maintainers
14
Versions
1681
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@storybook/addon-docs

Superior documentation for your components

  • 6.0.0-alpha.7
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2.1M
decreased by-60.47%
Maintainers
14
Weekly downloads
 
Created

What is @storybook/addon-docs?

The @storybook/addon-docs package is a Storybook addon that allows developers to write documentation alongside their stories. It uses MDX (Markdown with JSX) to let you document components in a rich, interactive way. It can generate documentation automatically based on your stories and supports a wide range of component frameworks.

What are @storybook/addon-docs's main functionalities?

MDX Documentation

Allows writing documentation using MDX, which can include both Markdown and JSX. You can define metadata, write narrative documentation, and showcase live examples and prop tables.

import { Meta, Story, ArgsTable, Canvas } from '@storybook/addon-docs/blocks';

<Meta title='MyComponent' />

# MyComponent

This is a **custom documentation** for `MyComponent`.

<Canvas>
  <Story name='Basic' args={{ label: 'Hello World' }}>
    {args => <MyComponent {...args} />}
  </Story>
</Canvas>

<ArgsTable story='Basic' />

Automatic Props Table

Generates a table of the component's props automatically. This table includes the prop names, types, default values, and descriptions if they are specified in the component's propTypes or TypeScript definitions.

import { Meta, Story, ArgsTable } from '@storybook/addon-docs/blocks';

<Meta title='MyComponent' />

<Story name='Basic'>
  <MyComponent />
</Story>

<ArgsTable of={MyComponent} />

Embedding Stories

Allows embedding live Storybook stories within the documentation. This provides an interactive example of the component in use.

import { Meta, Story } from '@storybook/addon-docs/blocks';

<Meta title='MyComponent' />

<Story name='Basic'>
  <MyComponent />
</Story>

Other packages similar to @storybook/addon-docs

Keywords

FAQs

Package last updated on 07 Feb 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc