RMWC Floating Action Button component
npm install @rmwc/fabA floating action button (FAB) represents the primary action of a screen.
- Module @rmwc/fab
- Import styles:
- Using CSS Loader
- import '@rmwc/fab/styles';
- Or include stylesheets
- '@material/fab/dist/mdc.fab.css'
- '@rmwc/icon/icon.css'
- '@material/ripple/dist/mdc.ripple.css'
- MDC Docs: https://material.io/develop/web/components/buttons/floating-action-buttons/
``jsx`
`jsx`
`jsx`
<>
>
`jsx`
<>
style={{ backgroundColor: 'var(--mdc-theme-error)' }}
theme={['onError']}
/>
>
| Name | Type | Description |
|------|------|-------------|
| children | ReactNode | Content specified as children. |exited
| | boolean | Animates the FAB out of view. When this class is removed, the FAB will return to view. |icon
| | IconPropT | The icon for the FAB |label
| | any | Make the Fab extended with a label. |mini
| | boolean | Make the Fab smaller. |ripple
| | RipplePropT | Adds a ripple effect to the component |trailingIcon
| | IconPropT` | A trialing icon for the FAB |