Socket
Book a DemoInstallSign in
Socket

storybook-version

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

storybook-version

Add package or component version to the Storybook toolbar

latest
Source
npmnpm
Version
0.1.4
Version published
Maintainers
1
Created
Source

Storybook Addon Version

The Storybook Addon Version is used to highlight the version of a component or of a package within Storybook toolbar.

Installation

npm install storybook-version --save-dev

Basic Setup

Add the following code in the main.js of your Storybook configuration:

module.exports = {
  addons: ['storybook-version'],
};

Set the parameters of your story with the key value version in order to provide the necessary information to be displayed.

Configuration

PropertyRequiredType of ValueDescriptionExample
majorstringMajor version'1'
minorstringMinor version'2'
patchstringPatch version'3'
postfixstringPostifx version extra data'beta.1'
styleobject of keys string and values stringExtra css properties to overwrite default style of the Version'{ 'color' : 'red', 'border-width': '2px' }'

Implementation

export const parameters = {
  version: {
    major: '1',
    minor: '2',
    patch: '3'
  }
}

Story Setup Example

Add the version parameter in the default Story configuration:

import React from 'react'

export default {
  title: 'Component Button',
  parameters: {
    version: {
      major: '4',
      minor: '2',
      patch: '0',
      postfix: 'rc3',
      style: {
        color: 'red',
        'font-weight': '900',
        'font-size': '24px'
      }
    }
  }
}

Versions guideline

Storybook versionAddon latest supported version
60.1.1
80.1.2
9latest

Keywords

storybook-addons

FAQs

Package last updated on 26 Jul 2025

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.