Actions
FAB
The floating action button: a 56px ink button at the bottom right of a phone screen that starts the action people take most, "Add".
In kanso-ui as Fab
Anatomy
- Container: 56px tall (
size-control-xl),radius-lgcorners,shadow-2. - Icon:
add, 24px. - Label, extended only: "Add", 16px at weight 600.
- State layer: the label colour laid over the fill on hover and press.
Measurements
From the design’s stylesheet, each design token with the value kanso-ui gives it in light.
| Class | Property | Value |
|---|---|---|
k-fab | height | 56px (size-control-xl) |
padding | 0 20px (space-xl) 0 16px (space-lg) | |
border | 0 | |
border-radius | 16px (radius-lg) | |
box-shadow | shadow-2 | |
gap | 8px (space-sm) | |
font | 600 16px/20px font-plain | |
k-fab--icon | width | 56px (size-control-xl) |
padding | 0 |
Tokens used
| Design token | In kanso-ui | Light | Dark |
|---|---|---|---|
ink | --kui-color-ink | #1a1a1a | #ececec |
on-ink | --kui-color-on-ink | #fafafa | #121212 |
accent | --kui-color-accent | #1a1a1a | #ececec |
on-accent | --kui-color-on-accent | #fafafa | #121212 |
shadow-2 | --kui-shadow-kanso-2 | 0px 2px 6px 0px rgba(0, 0, 0, 0.08), 0px 8px 20px 0px rgba(0, 0, 0, 0.1) | 0px 4px 16px 0px rgba(0, 0, 0, 0.6) |
radius-lg | --kui-radius-kanso-lg | 16px | 16px |
radius-md | --kui-radius-kanso-md | 12px | 12px |
size-control-xl | --kui-sizing-kanso-control-xl | 56px | 56px |
size-icon-lg | --kui-sizing-kanso-icon-lg | 24px | 24px |
space-sm | --kui-spacing-kanso-sm | 8px | 8px |
space-lg | --kui-spacing-kanso-lg | 16px | 16px |
space-xl | --kui-spacing-kanso-xl | 20px | 20px |
state-hover | --kui-state-layer-opacity-kanso-hover | 0.08 | 0.08 |
state-pressed | --kui-state-layer-opacity-kanso-pressed | 0.12 | 0.12 |
focus-ring | --kui-color-focus-ring | #1a1a1a | #ececec |
font-plain | --kui-typography-font-family-plain | 'Roboto Flex', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif | 'Roboto Flex', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif |