Foundations
Elevation and surfaces
Kanso stacks a few calm layers instead of drawing boxes. A layer is a surface colour plus one of three shadows; nothing else marks depth.
The layers, live
Raised: cards, a summary, the selected navigation item, the selected segment.
shadow-1Floating: the FAB, menus, snackbars, tooltips.
shadow-2Overlay: dialogs and sheets.
shadow-3
The layers
| Layer | Surface | Shadow | What sits there |
|---|---|---|---|
| Ground | kui-color-paper | none | The page, lists, rows, page titles. |
| Raised | kui-color-kanso-surface | kui-shadow-kanso-1 | Cards, a summary, the selected navigation item, the selected segment. |
| Floating | kui-color-kanso-surface (or ink) | kui-shadow-kanso-2 | The FAB, menus, snackbars, tooltips. |
| Overlay | kui-color-kanso-surface over kui-color-scrim | kui-shadow-kanso-3 | Dialogs and sheets. |
| Recessed | kui-color-surface-sunken | none | The search field, a segmented control's track, hover on rows. |
In Kanso UI
The components read Material Design's five levels, kui-shadow-elevation1 to kui-shadow-elevation5, and the levels are drawn from Kanso's three: level 1 is kui-shadow-kanso-1, level 2 is kui-shadow-kanso-2, and levels 3 to 5 are kui-shadow-kanso-3. Elevated cards and buttons sit at 1, menus and pickers at 2, dialogs, the FAB and snackbars at 3. Every container role from kui-color-surface-container-lowest to -high is Kanso's surface, and -highest is surface-sunken.
- An elevated
Cardis the raised layer: use it for one object. - An outlined
Cardis the flat card, a rule with no shadow, for printed or embedded contexts where shadows don't show. - A
Dialog, aSheetand aPopoverlift themselves; a menu or a select's list is a popover.
Rules
- Do lift a group into a card only when it is one object (a summary, a list of payments, a form). A list of rows on its own sits flat on paper.
- Do keep one level of cards: no card inside a card. Use a
Separatoror space inside instead. - Do use the shadow that matches the job, never a stronger one to draw attention: attention is the spotlight's job.
- Don't add borders to raised surfaces.
- Don't stack floating things: one menu or one snackbar at a time.
Snackbarqueues its messages and shows one.
Dark theme
In dark, shadows are deeper but do little against a dark ground, so the surface tones carry the depth: paper #121212, surface #1c1c1c, surface-sunken #262626, container #2b2b2b. Each step up is lighter, never tinted.
The spotlight
The spotlight card is the one surface with a colour of its own (kui-color-spotlight). It sits at the raised level without a shadow: its colour is enough. Only one per screen. SpotlightCard is coming; its colours are in place already.