Package Exports
- @storybook/addon-viewport
- @storybook/addon-viewport/register
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@storybook/addon-viewport) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Storybook Viewport Addon
Storybook Viewport Addon allows your stories to be displayed in different sizes and layouts in Storybook. This helps build responsive components inside of Storybook.
This addon works with Storybook for: React and Vue.
Installation
Install the following npm module:
npm i --save-dev @storybook/addon-viewport
or with yarn:
yarn add -D @storybook/addon-viewport
Basic Usage
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.
FAQ
How do I add a new device?
Unfortunately, this is currently not supported.
How can I make a custom screen size?
Unfortunately, this is currently not supported.