Socket
Socket
Sign inDemoInstall

@storybook/addon-measure

Package Overview
Dependencies
Maintainers
11
Versions
1029
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@storybook/addon-measure

Inspect layouts by visualizing the box model


Version published
Maintainers
11
Created

What is @storybook/addon-measure?

The @storybook/addon-measure npm package is a Storybook addon used for measuring and inspecting elements in a Storybook UI. This tool is particularly useful for developers and designers to ensure precise visual consistency directly within the Storybook environment. It allows users to measure dimensions, spacing, and alignment of components during the development process.

What are @storybook/addon-measure's main functionalities?

Element Measurement

This feature allows users to measure the dimensions and spacing of components. By adding the withMeasure decorator, users can toggle measurement tools in the Storybook UI to inspect the component presented in the story.

import { withMeasure } from '@storybook/addon-measure';

export default {
  title: 'Your Component',
  decorators: [withMeasure]
};

export const YourStory = () => <YourComponent />;

Alignment Inspection

This feature enables users to check the alignment of elements within components. The decorator adds visual guides that help in aligning text, icons, or other elements accurately within the component.

import { withMeasure } from '@storybook/addon-measure';

export default {
  title: 'Another Component',
  decorators: [withMeasure]
};

export const AnotherStory = () => <AnotherComponent />;

Other packages similar to @storybook/addon-measure

Keywords

FAQs

Package last updated on 08 Jul 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc