Core concepts

Design tokens

Every value an sx prop takes, read straight from @hzblj/kara-theme when this page was built. Colours are named by what they are for; whose colour each one is — the platform’s, or a hex kara owns — is the value’s business.

Colours

A system name resolves on the device — so it follows the user’s appearance, contrast setting and, on Android, the Material scheme. Swatches show light, then dark, for the colours kara owns. Any colour can be overridden in the theme.

border

TokeniOSAndroid
border.accent#ff5700#ff5700
border.destructiveUIKit systemRedColorMaterial error
border.quinaryUIKit quaternarySystemFillColorMaterial surfaceContainerHighest
border.secondary.baseUIKit opaqueSeparatorColorMaterial outline
border.secondary.mutedUIKit separatorColorMaterial outlineVariant
border.tertiaryUIKit separatorColorMaterial outlineVariant

btn

TokeniOSAndroid
btn.bg.glass.base#ffffff29#ffffff29
btn.bg.glass.disabled#ffffff0a#ffffff0a
btn.bg.secondary.baseUIKit secondarySystemFillColorMaterial secondaryContainer
btn.bg.secondary.disabledUIKit quaternarySystemFillColorMaterial surfaceContainerHighest
btn.content.disabledUIKit tertiaryLabelColorMaterial outline

content

TokeniOSAndroid
content.accent#ff5700 / #ff6e39#ff5700 / #ff6e39
content.destructiveUIKit systemRedColorMaterial error
content.on.bg#ffffff#ffffff
content.on.destructive#ffffffMaterial onError
content.on.high.contrastUIKit systemBackgroundColorMaterial inverseOnSurface
content.primaryUIKit labelColorMaterial onSurface
content.quaternaryUIKit quaternaryLabelColorMaterial outlineVariant
content.secondaryUIKit secondaryLabelColorMaterial onSurfaceVariant
content.successUIKit systemGreenColor#00cc68 / #00d68a
content.tertiaryUIKit tertiaryLabelColorMaterial outline

fill

TokeniOSAndroid
fill.accent.base#ffe8e1 / #ff45001f#ffe8e1 / #ff45001f
fill.accent.disabled#ffdccf / #ff45001f#ffdccf / #ff45001f
fill.accent.primary#ff5700#ff5700
fill.destructive.base#ffeff0 / #ff00001f#ffeff0 / #ff00001f
fill.destructive.disabled#ffdfe2 / #ff00001f#ffdfe2 / #ff00001f
fill.destructive.primaryUIKit systemRedColorMaterial error
fill.quaternaryUIKit quaternarySystemFillColorMaterial surfaceContainerHighest
fill.success.base#e3faf1 / #00c7561f#e3faf1 / #00c7561f
fill.success.primaryUIKit systemGreenColor#00c756 / #00cc68
fill.tertiaryUIKit tertiarySystemFillColorMaterial surfaceVariant

surface

TokeniOSAndroid
surface.baseUIKit systemGroupedBackgroundColorMaterial surface
surface.depth#f5f5f5 / #000000#f5f5f5 / #000000
surface.high.contrastUIKit labelColorMaterial inverseSurface
surface.primaryUIKit secondarySystemGroupedBackgroundColorMaterial surfaceContainerLow

Spacing

Padding, margins, gap, spacing, an icon’s size. Points on iOS, dp on Android.

TokenValue
s00
s11
s22
s44
s66
s88
s1010
s1212
s1616
s2020
s2424
s2828
s3232
s3636
s4040
s4848
s5656
s6464
s7272
s8080
s9696

Radii

TokenValue
none0
small8
medium12
large16
full999

Typography

Every variant is set in the platform’s face unless the theme names one, and grows with the user’s text size the way the platform style beside it does.

VariantSize / lineWeightGrows withSample
displayXl56 / 64medium · displaylargeTitleOrder summary
displayL48 / 56medium · displaylargeTitleOrder summary
headingXl40 / 48medium · displaylargeTitleOrder summary
headingL32 / 40medium · displaytitleOrder summary
headingM28 / 36medium · displaytitleOrder summary
headingS24 / 32medium · displaytitle2Order summary
headingXs20 / 28mediumtitle3Order summary
headline18 / 28mediumheadlineOrder summary
body16 / 24mediumbodyOrder summary
cardTitle14 / 24regularsubheadlineOrder summary
subheadline14 / 20regularsubheadlineOrder summary
subheadlineMedium14 / 20mediumsubheadlineOrder summary
footnote13 / 18regularfootnoteOrder summary
footnoteMedium13 / 18mediumfootnoteOrder summary
cardSubtitle12 / 16regularcaptionOrder summary
label12 / 16regularcaptionOrder summary
labelMedium12 / 16mediumcaptionOrder summary
caption11 / 16regularcaption2Order summary
captionMedium11 / 16mediumcaption2Order summary

Opacity

For opacity, and after a colon on a colour token: fill.accent.base:o50.

TokenValue
o00
o50.05
o100.1
o200.2
o250.25
o300.3
o400.4
o500.5
o600.6
o700.7
o750.75
o800.8
o850.85
o900.9
o950.95
o1001

Durations

TokenValue
d00 ms
d5050 ms
d100100 ms
d150150 ms
d200200 ms
d250250 ms
d300300 ms
d350350 ms
d400400 ms
d450450 ms
d500500 ms
d600600 ms
d700700 ms
d800800 ms
d10001000 ms
d15001500 ms
d20002000 ms
d30003000 ms
d50005000 ms
d1000010000 ms

Breakpoints

For responsive layout values, mobile first. base is everything narrower than sm.

TokenValue
sm576 pt
md768 pt
lg992 pt
xl1200 pt