Skip to content

Latest commit

 

History

History
49 lines (35 loc) · 1.14 KB

wired-fab.md

File metadata and controls

49 lines (35 loc) · 1.14 KB

wired-fab

Hand-drawn sketchy Floating Action Button (FAB)

For demo and view the complete set of wired-elememts: wiredjs.com

Usage

AAdd wired-elements to your JavaScript project:

npm i wired-elements

Import module in your code:

import { WiredFab } from 'wired-elements';
// or
import { WiredFab } from 'wired-elements/lib/wired-fab.js';

Or load directly into your HTML page:

<script type="module" src="https://unpkg.com/wired-elements/lib/wired-fab.js?module"></script>

Use it in your HTML:

<wired-fab id="btn1">
  <mwc-icon>favorite</mwc-icon>
</wired-fab>
<wired-fab id="btn2" class="red">
  <mwc-icon>close</mwc-icon>
</wired-fab>

Properties

disabled - disables the button. Default value is false.

Custom CSS Properties

--wired-fab-bg-color - Background color of the fab. Default value is #018786. Foreground color is set by setting the color css property.

Events

click - When button is clicked/submitted

License

MIT License (c) Preet Shihn