Docs
Storybook Docs

features

Parent: main.js|ts configuration

Type:

{
  argTypeTargetsV7?: boolean;
  legacyDecoratorFileOrder?: boolean;
}

Enables Storybook's additional features.

legacyDecoratorFileOrder

Type: boolean

Apply decorators from preview.js before decorators from addons or frameworks. More information.

.storybook/main.ts
// 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;

argTypeTargetsV7

(⚠️ Experimental)

Type: boolean

Filter args with a "target" on the type from the render function.

.storybook/main.ts
// 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;