1.0.5 • Published 3 years ago

rn-fab-button v1.0.5

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

rn-fab-button

platforms npm

A React Native Fab Button Component built using react-native animations providing the user ability to add buttons and customize them accordingly.

Prerequisites

Kindly install @react-native-vector-icons before you start using this component.

Table of content

Usage

import { FloatingButton } from "rn-fab-button";

<FloatingButton
  noOfButtons={2}
  icons={["example", "example"]}
  size={20}
  toggleBtnSize={20}
  width={40}
  height={40}
  onPress={() => console.log("running")}
  buttonBgColor={"green"}
  toggleButtonStyle={{ backgroundColor: "#8B008B" }}
  iconColor="white"
/>;

Props

Required

PropDescriptionTypeDefault
noOfButtonsNo of buttons to be displayedNumberRequired
iconsTakes an array of name of icons to renders into the buttons. Receives an object with array {['example','example']}ArryayRequired
widthWidth in pixels for the fab buttons, same for all of themNumberRequired for background of the icons
heightheight in pixels for the fab buttonsNumberRequired for background of the icons
toggleBtnSizeSize of the toggle buttonNumberRequired
buttonBgColorbackground color of the buttonsStringOptional
toggleButtonStylestyling for the toggle buttonsStringOptional
iconColorcolor of the fab button iconsStringRequired
sizesize of the fab buttonsNumberRequried
onPresscallback when the fab button is pressedfunctionOptional

Credits

Written by Rachit Sharma (masquerade-x)