UNPKG

1.01 kBMarkdownView Raw
1# Storybook Addon Actions
2
3Storybook Addon Actions can be used to display data received by event handlers in [Storybook](https://storybook.js.org).
4
5[Framework Support](https://storybook.js.org/docs/react/api/frameworks-feature-support)
6
7![Screenshot](https://raw.githubusercontent.com/storybookjs/storybook/next/addons/actions/docs/screenshot.png)
8
9## Installation
10
11Actions is part of [essentials](https://storybook.js.org/docs/react/essentials/introduction) and so is installed in all new Storybooks by default. If you need to add it to your Storybook, you can run:
12
13```sh
14npm i -D @storybook/addon-actions
15```
16
17Then, add following content to [`.storybook/main.js`](https://storybook.js.org/docs/react/configure/overview#configure-your-storybook-project):
18
19```js
20module.exports = {
21 addons: ['@storybook/addon-actions'],
22};
23```
24
25## Usage
26
27The basic usage is documented in the [documentation](https://storybook.js.org/docs/react/essentials/actions). For legacy usage, see the [advanced README](./ADVANCED.md).