Foundations

Tokens

Color, type, spacing and radius as named values.

Color tokens

Components use tokens, never a hex or a scale step. A token is a role (surfaceContainer, onPrimary), and it points to a step on one of the scales on the color page. Change the step, and every component that uses the token follows.

The names follow Material 3. In the app they live in the simplepark_design package: the standard roles in SPColorScheme, the extra surfaces in SPColorExtension.

TokenPoints toUse it for
primaryprimary 500The main action, the brand blue
onPrimarywhiteText and icons on primary
primaryContainerprimary 500Filled brand containers
onPrimaryContainerwhiteText on a primary container
secondarysecondary 1000Navy surfaces and secondary actions
onSecondarywhiteText and icons on secondary
tertiaryprimary 100Light blue tints, selected states
onTertiarysecondary 1000Text on tertiary
surfacewhiteThe background of a screen
onSurfacesecondary 1000Everything you read
onSurfaceVariantgrey 500Hints and placeholders
surfaceContainerLowestwhiteA container that sits flat on the surface
surfaceContainerLowgrey 50A quiet container
surfaceContainergrey 100The default card and field
surfaceContainerHighgrey 200A container that stands out
surfaceContainerHighestgrey 300The most set-apart container
onSurfaceContainerLowest to onSurfaceContainerHighgrey 400 to grey 700Secondary text in the matching container. Grey 400 and 500 are below 4.5 : 1, so they never carry information (see text on color)
onSurfaceContainerHighestsecondary 1000Text in the highest container
primarySurface, primarySurfaceContainerprimary 500, info backgroundBrand blocks, strong and light
secondarySurface, secondarySurfaceContainersecondary 1000, secondary 1000 at 7%Navy blocks, strong and light
successSurface, successSurfaceContainersuccess, success backgroundSuccess, strong and light
warningSurface, warningSurfaceContainerwarning, warning backgroundWarnings, strong and light
errorSurface, errorSurfaceContainererror, error backgroundErrors, strong and light
infoSurface, infoSurfaceContainergrey 500, grey 100Neutral information
disabledSurface, disabledSurfaceContainerdisabled, grey 50Disabled controls
outlinegrey 200Borders
outlineVariantgrey 100Dividers
scrimblack at 40%Behind a sheet or dialog
shadowblack at 12%Elevation

Every …Surface token has an …OnSurface partner for the text on it, and every …SurfaceContainer an …OnSurfaceContainer. Which pairs are readable is on the color page.

Type tokens

The type tokens are the eighteen styles of the type scale, from heroNumber to labelSm. heroNumber, displayXl and bodyXl are for the website only; the app uses the other fifteen. Each token sets the typeface, size, line height and weight together; never set one of them on its own.

GroupTokensTypeface
Website displayheroNumber, displayXlPoppins 600, website only
DisplaydisplayLg, displayMd, displaySmPoppins 600
HeadlineheadlineLg, headlineMd, headlineSmPoppins 600
TitletitleLg, titleMd, titleSmPoppins 500
BodybodyXl (website only), bodyLg, bodyMd, bodySmFigtree 400
LabellabelLg, labelMdPoppins 500, for buttons
LabellabelSmFigtree 500, for tags and chips

Numbers use the body or label token of their place, with tabular figures on. In the app the tokens live in SPTypographyTokens in the simplepark_design package. Today the app sets every token in Poppins; body and labelSm still have to move to Figtree.

Spacing and radius

Spacing and radius come from SPSpacingTokens and SPRadiusTokens. Use the steps; never a number in between.

Spacing tokenValueUse it for
space4XS2Hairline gaps, between a label and its value
space3XS4Between an icon and its text
space2XS6Inside small parts: plate padding, tags
spaceXS8Between related items in a row
spaceM12Inside a field or a button, between list rows
spaceML16Between blocks in a card
spaceL18Card padding, top and bottom
spaceXL20Between a title and what sits next to it
space2XL24Card padding, left and right; screen margins
space3XL30Between sections on a screen
space4XL36Above a screen title
space5XL and up48, 60, 72, 96, 120, 144, 192Empty states and large layouts
Radius tokenValueUse it for
radiusXS4The license plate, small tiles, bars
radiusS8The zone sign, callouts, small boxes
radiusM12Buttons, cards, fields, the parking card
radiusML16Sheets and large panels
radiusLG48Round elements that need a fixed radius
radiusFull9999Status tags, chips and segmented controls. Never buttons.

In the app every radius is drawn as a smooth corner, a squircle, with SmoothRectangleBorder and .spSmooth. On the web and in email a plain border-radius is close enough. See shapes for how the corners nest.

Other tokens

GroupTokensValues
Icon sizeSPIconTokens xs, sm, md, lg, xl, xxl16, 18, 20, 24, 32, 36
Line widthSPLineWidthTokens sm, smPlus, md, lg, xl1, 1.5, 2, 3, 4; dashes 4 on, 4 off
ElevationSPElevationTokens none, low, med, high0, 1, 3, 6
ShadowSPShadowTokens.softBlack at 4%, blur 12, no offset
MotionSPAnimationTokensSee motion