Skip to main content Home About the Design SystemRoadmap OverviewDesignersDevelopers OverviewColorGridIconographyInteractionsSpacingTypography Overview Global colorBox shadowTypographyBorderOpacitySpaceLengthIconBreakpointsMedia queries All elements Accordion Alert Announcement Audio player Avatar Back to top Badge Blockquote Breadcrumb Button Card Chip Code block Call to action Dialog Disclosure Footer Health index Icon Jump links Menu dropdown Navigation link Navigation (primary) Navigation (secondary) Navigation (vertical) Pagination PopoverPlanned Progress stepper Scheme toggle Site status Skeleton Skip link Spinner Statistic Subnavigation Surface Switch Table Tabs Tag Tile Timestamp Tooltip Video embed OverviewColor PalettesCustomizingDevelopers All PatternsAccordionCall to ActionCardFilterFormLink with iconLogo wallSearch barSticky bannerSticky cardTabsTagTile All Personalization PatternsAnnouncement FundamentalsAccessibility toolsAssistive technologiesCI/CDContentContributorsDesignDevelopmentManual testingResourcesScreen readers Design/code status Release notes Get support

Scheme toggle

OverviewStyleGuidelinesCodeAccessibilityDemos
OverviewStatusWhen to useStatus checklistOverviewStatusWhen to useStatus checklist

Overview

A scheme toggle switches between light, dark, and system default color schemes.

import '@rhds/elements/rh-scheme-toggle/rh-scheme-toggle.js';
body {
  color-scheme: light dark;
  background-color: light-dark(var(--rh-color-surface-lightest, #ffffff),
      var(--rh-color-surface-darkest, #151515));
  color: light-dark(var(--rh-color-text-primary-default-on-light, #151515),
      var(--rh-color-text-primary-default-on-dark, #ffffff));
}
<rh-scheme-toggle></rh-scheme-toggle>

Current color scheme setting

Legend text for the color scheme toggle group

Label text for the light mode option

Label text for the dark mode option

Label text for the system default option

Status

When to use

  • Provide system-responsive theme options that respect user preferences
  • Build applications that support multiple color schemes
  • Allow users to switch between light and dark color schemes

Status checklist

© 2025 Red Hat Deploys by Netlify