Vue Floating Action Button
npm install vue-fab
Floating Action Button for Vue.
The component supports multiple action buttons so you can add as many actions as you need. It will fire an event to the parent when clicking on each one.
```
npm install vue-fab --save
Include the following stylesheets on your document's head
``
And
``
| Properties | Type | Values |
| :--------------- | :------- | :--------- |
| bg-color | String | Default '#333333'position
Accepts all color formats: HEX, RGB & RGBA |
| | String | Default 'bottom-left' position-type
Options: 'bottom-left', 'bottom-right', 'top-left','top-right' |
| | String | Default 'fixed' z-index
Options: 'fixed' or 'absolute'|
| | String | Default '999' ripple-show
Set any value that suits your needs. |
| | Boolean | Default true ripple-color
Options: true or false. |
| | String | Default 'light' icon-size
Options: 'light' or 'dark'. |
| | String | Default 'medium' main-icon
Options: 'small', 'medium' or 'large'. |
| | String | Default 'add' main-tooltip
Use icons from the material icon library. |
| | String | Default null |actions
| | Array | Details bellowfixed-tooltip
| | Boolean | Default 'false'enable-rotation
if true, it shows the tooltip beside the actions
| | Boolean | Default 'true'start-opened
if true, the fab will rotate to indicate that it has been opened. Will not rotate if there are no actions specified.
| | Boolean | Default 'false'toggle-when-away
if true, the fab will start opened.
| | Boolean | Default 'true'
if false, the fab will not be closed when clicking outside from the fab component.
| Properties | Type | Values |
| :--------------- | :------- | :--------- |
| name | String | Name of the event |icon
| | String | Icon name (Please refer to Material icons) |tooltip
| | String | If not used, tooltip won't appear. |color
| | String | Default bg-color value
Accepts all color formats: HEX, RGB & RGBA |
Include the component in your .vue file, actions prop is required for the component to work. The @event has to match the name given in the actions prop. ``
@alertMe="alert"
>
Either color and position are set by default but they can be changed.
``
:bg-color="bgColor"
:actions="fabActions"
@cache="cache"
@alertMe="alert"
>
Match your data with your components props. The bgColor accepts either HEX, RBG or RGBA format.
Remember: Only material icons are accepted.
```