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

@storybook/addons

Package Overview
Dependencies
Maintainers
5
Versions
1495
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@storybook/addons

Storybook addons store

  • 7.0.12
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3.2M
decreased by-13.26%
Maintainers
5
Weekly downloads
 
Created

What is @storybook/addons?

The @storybook/addons package is a core module for Storybook that provides the infrastructure to build and use addons, which are essentially plugins that can be used to extend Storybook's UI and behavior. Addons can be used to add new features, integrate with other tools, customize the panel within Storybook, and enhance the development workflow.

What are @storybook/addons's main functionalities?

Addon Registration

This feature allows developers to register new addons with Storybook. The code sample demonstrates how to import the addons API and use it to register a custom addon.

import { addons } from '@storybook/addons';
import MyAddon from './my-addon';

addons.register('my-addon', MyAddon);

Addon Panel Creation

This feature allows developers to create new panels in the Storybook UI. The code sample shows how to add a new panel using the addons API.

import { addons, types } from '@storybook/addons';
import MyPanel from './my-panel';

addons.add('my-panel', {
  type: types.PANEL,
  title: 'My Panel',
  render: ({ active, key }) => (
    <MyPanel active={active} key={key} />
  )
});

Addon Tool Registration

This feature enables the addition of tools to the Storybook toolbar. The code sample illustrates how to register a new tool that will be displayed when the view mode is set to 'story'.

import { addons, types } from '@storybook/addons';
import MyTool from './my-tool';

addons.add('my-tool', {
  type: types.TOOL,
  title: 'My Tool',
  match: ({ viewMode }) => viewMode === 'story',
  render: MyTool
});

Other packages similar to @storybook/addons

Keywords

FAQs

Package last updated on 15 May 2023

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