Fab
The floating action button: the screen's main action, over its content at the bottom end.
Stability: experimental
Props
| Prop | Type | Default | Means |
|---|---|---|---|
label | string | What it does; its accessible name, and its text when extended. | |
icon | string | plus | Its icon. |
extended | boolean | false | Shows the label beside the icon. |
onPress | () => void | Runs when it is pressed. |
States
| State | Looks like |
|---|---|
default | A primary circle (a rounded square on Material) with a shadow. |
pressed | Scales to 95%. |
Accessibility
| role | button |
| name | The label prop. |
| focus | Tab reaches it. |
| keyboard | Enter and Space press it. |
Theme tokens
color.primary color.on-primary shadow.lg space.5 space.6 text.label
Example
<Fab label="New post" icon="plus" onPress={compose} />