1. Home
  2. Tokens
  3. Shape and elevation

Corners

Material Design's corner scale, from square to fully round. Kanso's corners, `kui-radius-kanso-*`: Soft but not round: every container keeps a clear corner, and every control is a pill.

  • --kui-radius-kanso-2xl

    24px

    Cards on phones.

  • --kui-radius-kanso-3xl

    28px

    The spotlight card, dialogs and the top corners of a sheet.

  • --kui-radius-kanso-lg

    16px

    The FAB and the cards of a dense web grid.

  • --kui-radius-kanso-md

    12px

    Text fields, menus, snackbars, inline alerts and navigation pane items.

  • --kui-radius-kanso-pill

    999px

    Every button, chip, badge, segmented control and the search field.

  • --kui-radius-kanso-sm

    8px

    Tooltips, team avatars, small thumbnails.

  • --kui-radius-kanso-xl

    20px

    Cards on the web.

  • --kui-radius-kanso-xs

    4px

    Small marks and the meter's segments.

Shadows

One shadow per elevation level, from Kanso's three: level 1 is shadow-1, level 2 shadow-2, levels 3 to 5 shadow-3. Three steps. Light shadows are two soft layers; dark shadows are deeper and the surface tone does most of the lifting.

  • --kui-shadow-kanso-1

    Light 0px 1px 2px 0px rgba(0, 0, 0, 0.06), 0px 2px 8px 0px rgba(0, 0, 0, 0.04) Dark 0px 1px 2px 0px rgba(0, 0, 0, 0.5)

    Cards, the selected navigation pane item, the selected segment.

  • --kui-shadow-kanso-2

    Light 0px 2px 6px 0px rgba(0, 0, 0, 0.08), 0px 8px 20px 0px rgba(0, 0, 0, 0.1) Dark 0px 4px 16px 0px rgba(0, 0, 0, 0.6)

    Things that float over content: the FAB, menus, snackbars, tooltips.

  • --kui-shadow-kanso-3

    Light 0px 8px 24px 0px rgba(0, 0, 0, 0.12), 0px 24px 56px 0px rgba(0, 0, 0, 0.14) Dark 0px 12px 40px 0px rgba(0, 0, 0, 0.7)

    Dialogs and sheets, above the scrim.

State layers

State-layer opacities: the on-colour of a container, painted over it at this strength. Kanso's own, `kui-state-layer-opacity-kanso-*`: State layers: the content colour of a control, painted over it at this strength.

  • --kui-state-layer-opacity-kanso-disabled-container

    0.12

    A disabled control's fill: ink at this strength.

  • --kui-state-layer-opacity-kanso-disabled-content

    0.38

    A disabled control's label and icon: ink at this strength. Disabled controls are exempt from contrast rules, but say why they are disabled nearby.

  • --kui-state-layer-opacity-kanso-focus

    0.1

    Keyboard focus, together with the focus ring.

  • --kui-state-layer-opacity-kanso-hover

    0.08

    Pointer over a control.

  • --kui-state-layer-opacity-kanso-pressed

    0.12

    Pressed or dragged.

Material Design steps

  • --kui-radius-circle

    9999px

    A circle on a square box: radio buttons, avatar marks, the loading indicator, slider handles.

  • --kui-radius-lg

    16px

    Large shape: the FAB, the calendar and date pickers, a sheet's corners, a square button at `lg`.

  • --kui-radius-md

    12px

    Medium shape: cards, the drop zone, popovers and other overlays, a square button at the smaller sizes.

  • --kui-radius-none

    0px

    Square corners: a full-screen dialog, a sheet edge that meets the window, a segmented button's inner seams.

  • --kui-radius-pill

    9999px

    Fully rounded ends: buttons at rest, badges, the search bar, the navigation indicator, switches.

  • --kui-radius-sm

    8px

    Small shape: chips, tags, the copy field, colour areas and sliders, the time picker's fields.

  • --kui-radius-xl

    28px

    Extra-large shape: dialogs, sheets, the search view, carousel items, the time picker, the largest buttons and FAB.

  • --kui-radius-xs

    4px

    Extra-small shape: fields, menus, selects, snackbars, plain tooltips, keycaps.

  • --kui-shadow-elevation1

    Light 0px 1px 2px 0px rgba(0, 0, 0, 0.06), 0px 2px 8px 0px rgba(0, 0, 0, 0.04) Dark 0px 1px 2px 0px rgba(0, 0, 0, 0.5)

    Level 1: elevated cards, buttons and chips at rest; a modal sheet. Kanso's `shadow-1`, deeper in dark.

  • --kui-shadow-elevation2

    Light 0px 2px 6px 0px rgba(0, 0, 0, 0.08), 0px 8px 20px 0px rgba(0, 0, 0, 0.1) Dark 0px 4px 16px 0px rgba(0, 0, 0, 0.6)

    Level 2: menus, popovers and pickers; a hovered elevated card or button. Kanso's `shadow-2`, deeper in dark.

  • --kui-shadow-elevation3

    Light 0px 8px 24px 0px rgba(0, 0, 0, 0.12), 0px 24px 56px 0px rgba(0, 0, 0, 0.14) Dark 0px 12px 40px 0px rgba(0, 0, 0, 0.7)

    Level 3: dialogs, the FAB, the snackbar, the search view. Kanso's `shadow-3`, deeper in dark.

  • --kui-shadow-elevation4

    Light 0px 8px 24px 0px rgba(0, 0, 0, 0.12), 0px 24px 56px 0px rgba(0, 0, 0, 0.14) Dark 0px 12px 40px 0px rgba(0, 0, 0, 0.7)

    Level 4: a hovered FAB, a dragged row. Kanso's `shadow-3`, deeper in dark.

  • --kui-shadow-elevation5

    Light 0px 8px 24px 0px rgba(0, 0, 0, 0.12), 0px 24px 56px 0px rgba(0, 0, 0, 0.14) Dark 0px 12px 40px 0px rgba(0, 0, 0, 0.7)

    Level 5: the highest lift; no component draws it. Kanso's `shadow-3`, deeper in dark.

  • --kui-state-layer-opacity-disabled-container

    0.12

    A disabled control's container: `kui-color-on-surface` at this opacity.

  • --kui-state-layer-opacity-disabled-content

    0.38

    A disabled control's label and icon: `kui-color-on-surface` at this opacity.

  • --kui-state-layer-opacity-dragged

    0.16

    The on-colour layered over an item while dragged.

  • --kui-state-layer-opacity-focus

    0.1

    The on-colour layered over a container while focused by keyboard.

  • --kui-state-layer-opacity-hover

    0.08

    The on-colour layered over a container while hovered.

  • --kui-state-layer-opacity-pressed

    0.1

    The on-colour layered over a container while pressed, under the ripple.