Skip to main content Home
About About the Design SystemRoadmap
Get started OverviewDesignersDevelopers
Foundations OverviewColorGridIconographyInteractionsSpacingTypography
Tokens Overview Global colorbox shadowTypographyborderopacityspacelengthIconBreakpointsMedia Queries
Elements 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 Navigation (primary) Navigation (secondary) Pagination PopoverPlanned Progress stepper Scheme toggle Site status Skeleton Skip link Spinner Statistic Subnavigation Surface Switch Table Tabs Tag Tile Timestamp Tooltip Video embed
Theming OverviewColor PalettesCustomizingDevelopers
Patterns All PatternsCardFilterFormLink with iconLogo wallSearch barSticky bannerSticky cardTabsTagTile
Personalization All Personalization PatternsAnnouncement
Accessibility FundamentalsAccessibility toolsAssistive technologiesCI/CDContentContributorsDesignDevelopmentManual testingResourcesScreen readers
Design/code status Release notes Get support

Scheme toggle

OverviewStyleGuidelinesCodeAccessibilityDemos
UsageWriting contentLayoutBehaviorBest practicesUsageWriting contentLayoutBehaviorBest practices

Usage

Use a scheme toggle to quickly switch between color schemes.

Writing content

The text label should be as short as possible, remove any extra words if necessary.

Element Character Count
Text label 20

Layout

Placement

A scheme toggle can change the look of a page or interface in one click, so it should be placed somewhere highly-visible. It is also recommended to place a scheme toggle in an element or pattern that scrolls with the user, so they always have access to it.

A light and dark scheme toggle on desktop viewports. The scheme toggle is on the far right and the logo is on the far left. A scheme toggle below a primary nav aligned to the right on both light and dark color schemes. A scheme toggle on light and dark mobile viewports seen inside the hamburger menu.

Behavior

User experience

When users interact with a scheme toggle, the following happens:

  • The color scheme changes immediately (if the color schemes that are being toggled are different)
  • Their selected color scheme is saved so it persists across browser sessions
  • Their saved preference is restored on page load

System default scheme

When users select the System default color scheme, the following happens:

  • The browser or operating system determines the appropriate scheme
  • The color scheme updates automatically if system preferences change

Best practices

Long text label

A scheme toggle with the label 'Color scheme:'.

Write label text using as few words as possible.

A scheme toggle with the label, 'Choose your preferred color scheme:'.

Do not use unnecessary words that make the text label longer.

No text label

Always use a text label next to or above the button group.

Do not remove the text label.

Other icons

A scheme toggle with the standard sun, moon, and combo sun/moon icons.

Maintain the same icons that are included.

A scheme toggle with non-standard icons in buttons (water, reverse clock, and star).

Do not change the icons, it causes confusion about what will happen when each button is selected.

© 2025 Red Hat Deploys by Netlify