storybook-addon-tags
A Storybook addon for adding component tags to the sidebar.
Requirements
- Storybook@>=6.0.0
Getting started
Install
npm install --save-dev storybook-addon-tags
# yarn add -D storybook-addon-tags
Register the addon in main.js
module.exports = {
addons: ["storybook-addon-tags"],
};
Include it with a sttory
Add tags to paramters, either globally (to all stories), or to a specific story:
export const Primary = Template.bind({});
Primary.args = {
primary: true,
label: "Button",
};
Primary.parameters = {
tag: {
title: "parent",
color: "#fff",
background: "orange"
},
};