🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

react-motion-float-button

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-motion-float-button

A simple React component floating button library which can be customized by developers.

1.0.0
latest
Source
npm
Version published
Maintainers
1
Created
Source

react-motion-float-button 🌈

🧚 A simple React component floating button library which can be customized by developers 🧚

drawing

🏃‍♂️ Getting Started

installation

npm install react-motion-float-button --save

or

yarn add react-motion-float-button

emotion-icons

you can easily use icons in button by installing emotion-icons

npm emotion-icons

npm install emotion-icons --save

or

yarn add emotion-icons

👀 icon explorer


📃 Usage

You can customize opening direction, size, colors of buttons via props. Other motions and options will be added soon

import {
  Direction,
  FloatMenuItemButton,
  FloatingGroup,
  Size,
} from "react-motion-float-button";

you can add emotion-icons and use various icons by importing only you need

import { Twitter } from "@emotion-icons/simple-icons";
import { Facebook, Instagram, Share } from "@emotion-icons/remix-fill";

also can customize icons, colors and define functions

const handleButton = () => {
  console.log("you clicked first icon!");
};

return (
  <>
    <FloatingGroup size={Size.REGULAR} direction={Direction.TOP} spacing={100}>
      <FloatMenuItemButton
        icon={<Twitter size="50%" />}
        buttonColor="#00ACEE"
        onClick={handleButton}
      />
      <FloatMenuItemButton
        icon={<Instagram size="60%" />}
        buttonColor="#4f5bd5"
      />
      <FloatMenuItemButton
        icon={<Facebook size="20%" />}
        buttonColor="#3B5998"
      />
      <FloatMenuItemButton icon={<Share size="50%" />} buttonColor="#16dbc2" />
    </FloatingGroup>
  </>
);

👀 Props

FloatingGroup

PropTypeDescription
sizeStringButton size; REGULAR is 56px, SMALL is 40px
DirectionStringspread direction; TOP, BOTTOM, LEFT, RIGHT
SpacingNumbermargin of button container; default is 20

FloatMenuItemButton

PropTypeDescription
iconComponenticon component
buttonColorStringeach icon's color

😎 contributors

4 FE Developers 🧞‍♂️

jinsun Park(jinsunee)

JungHun Choi(chjjh0)

Wonjong Oh(dev-owen)

SeoYoung Um(tjdud0123)

Keywords

FAB

FAQs

Package last updated on 31 Mar 2021

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