@storybook/addon-viewport
TypeScript icon, indicating that this package has built-in type declarations

8.0.8 • Public • Published

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.

Framework Support

Screenshot

Installation

Viewport is part of essentials and so is installed in all new Storybooks by default. If you need to add it to your Storybook, you can run:

npm i -D @storybook/addon-viewport

Then, add following content to .storybook/main.js:

export default {
  addons: ['@storybook/addon-viewport'],
};

You should now be able to see the viewport addon icon in the the toolbar at the top of the screen.

Usage

The usage is documented in the documentation.

Package Sidebar

Install

npm i @storybook/addon-viewport

Weekly Downloads

4,917,303

Version

8.0.8

License

MIT

Unpacked Size

16.3 kB

Total Files

12

Last publish

Collaborators

  • yannbf
  • kasperpeulen
  • valentinpalkovic
  • jreinhold
  • shilman
  • ndelangen
  • hypnosphi
  • tmeasday
  • igor-dv