```ts filename="MyComponent.stories.ts" renderer="angular" language="ts" import type { Meta, StoryObj } from '@storybook/angular'; import { MyComponent } from './MyComponent.component'; const meta: Meta = { component: MyComponent, }; export default meta; type Story = StoryObj; export const Default: Story = {}; export const Dark: Story = { //👇 Overrides the current theme for this story to render it with the dark theme globals: { theme: 'dark' }, }; ``` ```js filename="MyComponent.stories.js|jsx" renderer="common" language="js" import { MyComponent } from './MyComponent'; export default { component: MyComponent, }; export const Default = {}; export const Dark = { //👇 Overrides the current theme for this story to render it with the dark theme globals: { theme: 'dark' }, }; ``` ```ts filename="MyComponent.stories.ts|tsx" renderer="common" language="ts-4-9" // Replace your-framework with the name of your framework import type { Meta, StoryObj } from '@storybook/your-framework'; import { MyComponent } from './MyComponent'; const meta = { component: MyComponent, } satisfies Meta; export default meta; type Story = StoryObj; export const Default: Story = {}; export const Dark: Story = { //👇 Overrides the current theme for this story to render it with the dark theme globals: { theme: 'dark' }, }; ``` ```ts filename="MyComponent.stories.ts|tsx" renderer="common" language="ts" // Replace your-framework with the name of your framework import type { Meta, StoryObj } from '@storybook/your-framework'; import { MyComponent } from './MyComponent'; const meta: Meta = { component: MyComponent, }; export default meta; type Story = StoryObj; export const Default: Story = {}; export const Dark: Story = { //👇 Overrides the current theme for this story to render it with the dark theme globals: { theme: 'dark' }, }; ``` ```js filename="MyComponent.stories.js" renderer="web-components" language="js" export default { component: 'my-component', }; export const Default = {}; export const Dark = { globals: { theme: 'dark' }, }; ``` ```ts filename="MyComponent.stories.ts" renderer="web-components" language="ts" import type { Meta, StoryObj } from '@storybook/web-components'; const meta: Meta = { component: 'my-component', }; export default meta; type Story = StoryObj; export const Default: Story = {}; export const Dark: Story = { //👇 Overrides the current theme for this story to render it with the dark theme globals: { theme: 'dark' }, }; ```