About the Material 3 component gallery

The gallery shows the core Material 3 components, built from your color scheme, so you can see how a theme looks on buttons, chips, cards, text fields, navigation, dialogs and progress indicators before you write any code.

Every component is plain HTML and CSS colored only with the --md-sys-color-* tokens from the theme builder's CSS export, and the gallery renders exactly the code you copy. Each one also has the matching Jetpack Compose and Flutter code, which picks the same colors up from your app theme.

How to use it

  1. Pick a seed color, scheme style, contrast level and color spec, or open the gallery from the theme builder.
  2. Switch between light and dark and try the interactive parts (switches, chips, navigation).
  3. Copy the HTML, CSS, Compose or Flutter code for the components you need, and export the theme from the theme builder.

Questions

Which colors does each Material 3 component use?

Filled buttons use primary and on-primary, tonal buttons secondary-container, cards the surface-container roles, the navigation bar surface-container with a secondary-container indicator, dialogs surface-container-high, and snackbars inverse-surface with an inverse-primary action.

Do I need a library to use the HTML and CSS versions?

No. They are plain HTML and CSS. Load the CSS tokens from the theme builder (tokens.css) and the Material Symbols font for the icons. Switches, chips, checkboxes and the navigation bar use native inputs, so they work without JavaScript.

Is this the same as Material Web (@material/web)?

No. Material Web is Google's web component library, now in maintenance mode. The gallery's HTML and CSS are a lightweight alternative that uses the same --md-sys-color-* token names, so a theme exported here works with both.

What is the 2025 color spec?

It is the M3 Expressive version of the Material color rules used by Android 16, with brighter containers and more colorful surfaces. Switch between 2021 and 2025 to compare them on the same components.