1. Home
  2. Foundations
  3. 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-1

  • Floating: the FAB, menus, snackbars, tooltips.

    shadow-2

  • Overlay: dialogs and sheets.

    shadow-3

The layers

LayerSurfaceShadowWhat sits there
Groundkui-color-papernoneThe page, lists, rows, page titles.
Raisedkui-color-kanso-surfacekui-shadow-kanso-1Cards, a summary, the selected navigation item, the selected segment.
Floatingkui-color-kanso-surface (or ink)kui-shadow-kanso-2The FAB, menus, snackbars, tooltips.
Overlaykui-color-kanso-surface over kui-color-scrimkui-shadow-kanso-3Dialogs and sheets.
Recessedkui-color-surface-sunkennoneThe 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 Card is the raised layer: use it for one object.
  • An outlined Card is the flat card, a rule with no shadow, for printed or embedded contexts where shadows don't show.
  • A Dialog, a Sheet and a Popover lift 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 Separator or 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. Snackbar queues 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.