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
StylesStyles

Styles

The scheme toggle consists of three radio button options presented as an icon button group:

  • Light mode: Sun icon for light color scheme
  • Dark mode: Moon icon for dark color scheme
  • System: Auto icon for system preference

Visual design

  • Uses icon-only buttons with tooltips for compact presentation
  • Icons clearly communicate each mode (sun, moon, auto)
  • Icon buttons are visually grouped into a single control

States

  • Default: Shows current selection with visual emphasis
  • Hover: Provides hover feedback on interactive elements
  • Focus: Clear focus indicators for keyboard navigation
  • Selected: Active state clearly indicates current scheme selection

Customization

The toggle supports customizable label text through attributes:

  • legend-text: Text for the fieldset legend (default: "Color scheme")
  • light-text: Label for light mode option (default: "Light")
  • dark-text: Label for dark mode option (default: "Dark")
  • system-text: Label for system option (default: "System")

Other libraries

To learn more about our other libraries, visit the getting started page.

© 2025 Red Hat Deploys by Netlify