material-components-vue
Version:
Material Design components for Vue.js
73 lines (54 loc) • 1.56 kB
Markdown
"Favorite">
<m-fab-icon class="material-icons">favorite</m-fab-icon>
</m-fab>
```
```html
<m-fab>
<m-fab-icon class="material-icons">add</m-fab-icon>
<m-fab-label>Create</m-fab-label>
</m-fab>
```
| Prop | Type | Default | Description |
|------|------|---------|-------------|
| mini | Boolean | false | modifies the FAB to a smaller size |
| absoluteRight | Boolean | false | **Might be deprecated in future version and not recommended.** Whether the fab should be rendered on the bottom right |
| exited | Boolean | false | animates the fab out of view |
| ripple | Boolean | true | use js ripple or not |
| href | String | '' | render as `<a class="m-fab">` if presented |
Events and attributes are mapped to the inner button element.
| Slot | Description |
|------|-------------|
| default | fab content |
Developers must position `<m-fab>` as needed within their application’s design.
```html
<style>
.app-fab--absolute {
position: fixed;
bottom: 1rem;
right: 1rem;
}
@media(min-width: 1024px) {
.app-fab--absolute {
bottom: 1.5rem;
right: 1.5rem;
}
}
</style>
<m-fab class="app-fab--absolute" aria-label="Favorite">
<m-fab-icon class="material-icons">favorite</m-fab-icon>
</m-fab>
```
| Slot | Description |
|------|-------------|
| default | label content |
- https://github.com/material-components/material-components-web/tree/master/packages/mdc-fab
```html
<m-fab aria-label=