Skip to content

Latest commit

 

History

History
 
 

options

Storybook Options Addon

Greenkeeper badge Build Status CodeFactor Known Vulnerabilities BCH compliance codecov Storybook Slack

The Options addon can be used to set configure the Storybook UI.

This addon works with Storybook for: React and React Native.

Screenshot

Getting Started

First, install the addon

npm install -D @storybook/addon-options

Add this line to your addons.js file (create this file inside your storybook config directory if needed).

import '@storybook/addon-options/register';

Import and use the setOptions function in your config.js file.

import * as storybook from '@storybook/react';
import { setOptions } from '@storybook/addon-options';

setOptions({
  name: 'My Storybook',
  url: 'https://example.com',
  goFullScreen: false,
  showLeftPanel: false,
  showDownPanel: false,
  showSearchBox: false,
  downPanelInRight: false,
  sortStoriesByKind: false,
});

storybook.configure(() => require('./stories'), module);