Storybook Viewport Addon allows your stories to be displayed in different sizes and layouts in Storybook. This helps build responsive components inside of Storybook.
Install the following npm module:
npm i --save-dev @storybook/addon-viewport
or with yarn:
yarn add -D @storybook/addon-viewport
Simply import the Storybook Viewport Addon in the addons.js
file in your .storybook
directory.
import '@storybook/addon-viewport/register'
This will register the Viewport Addon to Storybook and will show up in the action area.
Unfortunately, this is currently not supported.
Unfortunately, this is currently not supported.