Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

floating-action

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

floating-action

This custom element will create a floating action button.

  • 2.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
13
decreased by-13.33%
Maintainers
1
Weekly downloads
 
Created
Source

Float action

This custom element will create a floating action button. When hover over the element it will reveal the hidden menu. This is a touch event on touch devices

Demo

Demo

Install

Install the component using NPM:

$ npm install floating-action --save

Dependencies

Custom element polyfill

https://github.com/WebReflection/document-register-element

classList polyfill

https://www.npmjs.com/package/classlist

Usage

Add Custom Element Script:

<script src="../dist/float-action.js"></script>

Start using it!

<cs-floatingaction button=".c-floating__button" container=".c-floating__nav" toggle="c-floating__nav--show" move-element="c-floating--offbottom" to-bottom="10">

    <nav class="c-floating__nav">
        <a href="" class="c-floating__link">
            <span class="glyphicon glyphicon-eye-open"></span> View reminders
        </a>
        <a href="" class="c-floating__link">
            <span class="glyphicon glyphicon-calendar"></span> Create reminder
        </a>
    </nav>

    <a href="" class="c-floating__button">
        <i class="material-icons md-36 c-floating__icon">add</i>
    </a>

</cs-floatingaction>

##Options

AttributeOptionsDefaultDescription
buttonCss SelectornullThis is required. Its the class on the icon that is allow aways visible.
containerCss SelectornullThis is required. Its the container that is hidden containing the links
toggleStringnullThis is required. This is the name of the class that needs to be added to display the container
move-elementStringnullIf required to move the custom element of the bottom of the window. This is the class that will be added or remove when scroll off the bottom on the window
to-bottomString0How far from the bottom of the window should the 'move-element' class be added or removed

Keywords

FAQs

Package last updated on 05 Jun 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc