Skip to main content

Design Tokens

md3-react provides a comprehensive set of Material Design 3 design tokens for colors, typography, shape, elevation, motion, and state.

Color Tokens

Primary Colors

TokenLightDarkUsage
primary#6750A4#D0BCFFPrimary brand color
onPrimary#FFFFFF#381E72Text/icons on primary
primaryContainer#EADDFF#4F378BContainer backgrounds
onPrimaryContainer#21005D#EADDFFText on primary container

Secondary Colors

TokenLightDarkUsage
secondary#625B71#CCC2DCSecondary brand color
onSecondary#FFFFFF#332D41Text/icons on secondary
secondaryContainer#E8DEF8#4A4458Container backgrounds
onSecondaryContainer#1D192B#E8DEF8Text on secondary container

Surface Colors

TokenLightDarkUsage
surface#FEF7FF#141218Default surface
onSurface#1D1B20#E6E0E9Text on surface
surfaceVariant#E7E0EC#49454FVariant surface
surfaceContainer#F3EDF7#211F26Container surface

Error Colors

TokenLightDarkUsage
error#B3261E#F2B8B5Error states
onError#FFFFFF#601410Text on error
errorContainer#F9DEDC#8C1D18Error container
onErrorContainer#410E0B#F9DEDCText on error container

Typography Tokens

Scale

TokenFont SizeLine HeightWeightUsage
displayLarge57px64px400Hero text
displayMedium45px52px400Large headings
displaySmall36px44px400Section headings
headlineLarge32px40px400Page titles
headlineMedium28px36px400Section titles
headlineSmall24px32px400Card titles
titleLarge22px28px400Large titles
titleMedium16px24px500Medium titles
titleSmall14px20px500Small titles
labelLarge14px20px500Button text
labelMedium12px16px500Tabs, chips
labelSmall11px16px500Captions
bodyLarge16px24px400Body text
bodyMedium14px20px400Default body
bodySmall12px16px400Supporting text

Shape Tokens

TokenValueUsage
none0pxNo rounding
extraSmall4pxChips, small elements
small8pxButtons, inputs
medium12pxCards, dialogs
large16pxLarge cards
extraLarge28pxFABs, large containers
full9999pxCircular elements

Elevation Tokens

TokenBox ShadowUsage
level0noneFlat elements
level10px 1px 2px rgba(0,0,0,0.3)...Raised elements
level20px 1px 2px rgba(0,0,0,0.3)...Elevated buttons
level30px 4px 8px rgba(0,0,0,0.15)...Cards
level40px 6px 10px rgba(0,0,0,0.15)...Dialogs
level50px 8px 12px rgba(0,0,0,0.15)...Modals

Motion Tokens

Duration

TokenValueUsage
short150msMicro-interactions
short2100msQuick transitions
short3150msStandard short
short4200msHover states
medium1250msStandard
medium2300msExpansion
medium3350msComplex
medium4400msLarge elements

Easing

TokenValueUsage
standardcubic-bezier(0.2, 0, 0, 1)Default
emphasizedcubic-bezier(0.2, 0, 0, 1)Important transitions
emphasizedDeceleratecubic-bezier(0.05, 0.7, 0.1, 1)Enter animations
emphasizedAcceleratecubic-bezier(0.3, 0, 0.8, 0.15)Exit animations

State Tokens

TokenValueUsage
hover0.08Hover state opacity
focus0.10Focus state opacity
pressed0.10Pressed state opacity
dragged0.16Drag state opacity
disabled0.38Disabled content opacity
disabledContainer0.12Disabled container opacity