Installation
Setup
Register the addon in your.storybook/main.ts:
Usage
Define args in your story:Control Types
The Controls addon supports these control types:Text
For string values:Number
For numeric values with optional constraints:Range
For numeric values with a slider:Boolean
For true/false values:Color
For color values with a color picker:Select
For selecting one value from a dropdown:Radio
For selecting one value from radio buttons:Inline Radio
For inline radio button layout:Multi-Select
For selecting multiple values:Object
For object values (JSON editor):Array
For array values:Date
For date values with a date picker:Parameters
Customize Controls behavior with parameters:Controls addon configuration
How to sort controls in the panel:
'alpha': Alphabetically by name'requiredFirst': Required args first, then alphabetically'none': Display in definition order
Whether to expand object/array controls by default
Preset colors for the color picker
Hide the warning when no controls are defined