Skip to content

FE: Add dark mode to Storybook #43468

@RachelElysia

Description

@RachelElysia

Description

  • A dark/light mode toggle in the Storybook toolbar allows previewing all components in both light and dark mode. Clicking the sun/moon icon in the top nav switches themes instantly.
  • The toggle applies the same body.dark-mode class used in the production app, so Storybook rendering matches what users see.
  • Previously there was no way to preview components in dark mode without running the full app.

Ideal workflow

A designer or engineer opens Storybook, clicks the theme toggle once, and sees every component rendered in dark mode — no need to navigate to the running app or toggle settings there.

To view

  • Runyarn storybook
  • Go to http://localhost:6006
  • View the toggle on the top allows dark mode to be viewed for every component

Metadata

Metadata

Labels

#g-softwareSoftware product group:releaseReady to write code. Scheduled in a release. See "Making changes" in handbook.~engineering-initiatedEngineering-initiated story, such as a bug, refactor, or contributor experience improvement.~frontendFrontend-related issue.

Type

No type

Projects

Status

✅ Ready for release

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions