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 group 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 Readtime Scheme dropdown Scheme toggle Select Site status Skeleton Skip link Spinner Statistic Subnavigation Surface Switch Table Tabs Tag Tile Timestamp Tooltip Video embed How to useProject FeltColor PalettesCustomizingDevelopers All PatternsAccordionAlertCall to ActionCardFilterFormLink with iconLogo wallSearch barSticky bannerSticky cardTabsTagTile AI design principlesLegal requirementsTransparency noticesIconographyColorChatbot avatarsAnimation All Personalization PatternsAnnouncement FundamentalsColorAccessibility toolsAssistive technologiesCI/CDContentContributorsDesignDevelopmentManual testingResourcesScreen readers Design/code status Release notes Get support

Scheme dropdown Since v4.2.0

OverviewStyleGuidelinesCodeAccessibilityDemos
OverviewStatusWhen to useStatus checklistOverviewStatusWhen to useStatus checklist

Overview

Provides a color scheme picker for switching between light, dark, and system defaults. Accessible by default with a screen-reader label (WCAG 4.1.2), keyboard navigation, and focus management. Authors should set accessible-label for localization.

import '@rhds/elements/rh-scheme-dropdown/rh-scheme-dropdown.js';
body {
  color-scheme: light dark;
  background-color: var(--rh-color-surface);
  color: var(--rh-color-text-primary);
}

rh-scheme-dropdown {
  padding: var(--rh-space-md, 8px);
}
<rh-scheme-dropdown></rh-scheme-dropdown>
import { SchemeDropdown } from "@rhds/elements/react/rh-scheme-dropdown/rh-scheme-dropdown.js";

// NOTE: React 19+ does not require these wrapper imports.
// You can use the custom elements directly as-is.

export const Demo = () => (
  <SchemeDropdown />
);

Current color scheme setting. Reflects to the scheme attribute and initializes from localStorage.rhdsColorScheme when available. When set, applies the value to document.body.style.colorScheme and persists it to localStorage.

Visually hidden accessible label for the scheme dropdown. Authors should keep this text short (under 20 characters).

Accessible label for the light mode option.

Accessible label for the dark mode option.

Accessible label for the system default option.

View source on GitHub

Status

When to use

  • Allow users to select from a list of predefined color schemes

Status checklist

© 2026 Red Hat Deploys by Netlify