Share your suggestion
Many demos are currently presented on dark backgrounds, which works well for dark-themed websites. However, developers building light-themed websites may also want to preview how components look in a light context.
I would like to propose adding a small light/dark background toggle to the component demo preview area.
Proposed behavior
- Keep the current dark background as the default.
- Add a Light / Dark toggle for demo preview containers.
- Only change the preview background, not the component source code.
- Avoid changing existing component APIs.
- Optionally persist the selected preview background in
localStorage.
- For components that do not adapt well to a light background, the toggle can be hidden or disabled, keeping the current dark-only preview.
Why this is useful
This would help developers building light-themed websites evaluate components in a more realistic context without manually editing the demo code.
I would be happy to open a PR for this if the direction sounds good.
I have already tried this approach locally with several existing components, and many of them appear to work well with both dark and light preview backgrounds.
examples:

Validations
Share your suggestion
Many demos are currently presented on dark backgrounds, which works well for dark-themed websites. However, developers building light-themed websites may also want to preview how components look in a light context.
I would like to propose adding a small light/dark background toggle to the component demo preview area.
Proposed behavior
localStorage.Why this is useful
This would help developers building light-themed websites evaluate components in a more realistic context without manually editing the demo code.
I would be happy to open a PR for this if the direction sounds good.
I have already tried this approach locally with several existing components, and many of them appear to work well with both dark and light preview backgrounds.

examples:
Validations