1 | # Storybook Addon Actions
|
2 |
|
3 | Storybook 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/code/addons/actions/docs/screenshot.png)
|
8 |
|
9 | ## Installation
|
10 |
|
11 | Actions is part of [essentials](https://storybook.js.org/docs/react/essentials) 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
|
14 | npm i -D @storybook/addon-actions
|
15 | ```
|
16 |
|
17 | Then, add following content to [`.storybook/main.js`](https://storybook.js.org/docs/react/configure/#configure-your-storybook-project):
|
18 |
|
19 | ```js
|
20 | export default {
|
21 | addons: ['@storybook/addon-actions'],
|
22 | };
|
23 | ```
|
24 |
|
25 | ## Usage
|
26 |
|
27 | The basic usage is documented in the [documentation](https://storybook.js.org/docs/react/essentials/actions). For legacy usage, see the [advanced README](./ADVANCED.md).
|