features
Parent: main.js|ts configuration
Type:
{
actions?: boolean;
argTypeTargetsV7?: boolean;
backgrounds?: boolean;
controls?: boolean;
developmentModeForBuild?: boolean;
highlight?: boolean;
interactions?: boolean;
legacyDecoratorFileOrder?: boolean;
measure?: boolean;
outline?: boolean;
toolbars?: boolean;
viewport?: boolean;
}
Enables Storybook's additional features.
actions
Type: boolean
Enable the Actions feature.
argTypeTargetsV7
(⚠️ Experimental)
Type: boolean
Filter args with a "target" on the type from the render function.
// Replace your-framework with the framework you are using (e.g., react-webpack5, vue3-vite)
import type { StorybookConfig } from '@storybook/your-framework';
const config: StorybookConfig = {
framework: '@storybook/your-framework',
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
features: {
argTypeTargetsV7: true,
},
};
export default config;
backgrounds
Type: boolean
Enable the Backgrounds feature.
controls
Type: boolean
Enable the Controls feature.
developmentModeForBuild
Type: boolean
Set NODE_ENV
to 'development'
in built Storybooks for better testing and debugging capabilities.
// Replace your-framework with the framework you are using (e.g., react-webpack5, vue3-vite)
import type { StorybookConfig } from '@storybook/your-framework';
const config: StorybookConfig = {
framework: '@storybook/your-framework',
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
features: {
developmentModeForBuild: true,
},
};
export default config;
highlight
Type: boolean
Enable the Highlight feature.
interactions
Type: boolean
Enable the Interactions feature.
legacyDecoratorFileOrder
Type: boolean
Apply decorators from preview.js before decorators from addons or frameworks. More information.
// Replace your-framework with the framework you are using (e.g., react-webpack5, vue3-vite)
import type { StorybookConfig } from '@storybook/your-framework';
const config: StorybookConfig = {
framework: '@storybook/your-framework',
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
features: {
legacyDecoratorFileOrder: true,
},
};
export default config;
measure
Type: boolean
Enable the Measure feature.
outline
Type: boolean
Enable the Outline feature.
toolbars
Type: boolean
Enable the Toolbars feature.
viewport
Type: boolean
Enable the Viewport feature.