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
Accessibility
- A
<button>. Extended, the label "Add" is its name; icon only,aria-label="Add something". - Place it in the DOM after the screen's content and before the navigation bar, where it sits on screen, so Tab and screen readers meet it in that order.
- Keep it 16px (
space-lg) from the right edge and above the navigation bar, and pad the end of the scroll by 72px so the last row clears it. - Target: 56px.
- Contrast, light / dark:
on-inkonink16.7 / 15.9:1, and the ink fill onpaper16.7 / 15.9:1;on-accentonaccent7.6 / 7.7:1, and the accent fill onpaper7.3 / 9.0:1; the focus ring onpaper7.3 / 9.0:1. - Motion: the press is a 300ms spring;
prefers-reduced-motionturns the shrink off.