Socket
Socket
Sign inDemoInstall

react-native-fab

Package Overview
Dependencies
1
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-fab

A FAB button component for Android and iOS, customizable, simple and as per material design specs.


Version published
Maintainers
1
Weekly downloads
234
decreased by-3.31%

Weekly downloads

Readme

Source

react-native-fab

A FAB button component for Android and iOS, customizable, simple and as per material design specs.

FAB demo with snackbar

See Google Material Design for more info on FABs.

Installation

npm install --save react-native-fab

Basic Usage

import FAB from 'react-native-fab'

Code

<FAB buttonColor="red" iconTextColor="#FFFFFF" onClickAction={() => {console.log("FAB pressed")}} visible={true} iconTextComponent={<Icon name="all-out"/>} />

Options

PropTypeEffectDefault Value
visiblebooleanShow or hide the FABtrue
buttonColorstringThe color of FABred
onClickActionfunctionFunction to be called when button is pressed()=>{}
iconTextColorcolorThe color of icon of FAB#FFFFFF
iconTextComponentcomponentText component or any other component based on it, works great with Icon from react-native-vector-icons<Text>+</Text>
snackOffsetnumberThe amount by which to move up the FAB to accomodate snackbar0

Note

  • When visible prop is changed, the FAB will be animated in/out of screen.
  • This works great together with react-native-snackbar-component. See demo for example and instructions how to.

Keywords

FAQs

Last updated on 16 Aug 2021

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc