Socket
Socket
Sign inDemoInstall

react-native-floating-action-button

Package Overview
Dependencies
0
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    react-native-floating-action-button

Fully customizable Floating Action Button for React Native.


Version published
Weekly downloads
18
decreased by-30.77%
Maintainers
1
Install size
15.6 kB
Created
Weekly downloads
 

Readme

Source

React Native Bottom Bar

Battle Tested ✅

Fully customizable material designed floating action button component for React Native.

npm version npm Platform - Android and iOS License: MIT styled with prettier

React Native Floating Action Button

Installation

Add the dependency:

npm i react-native-floating-action-button

Peer Dependencies

IMPORTANT! You need install them.
"react": ">= 16.x",
"react-native": ">= 0.55.x",
"react-native-vector-icons": ">= 6,x,x",
"react-native-material-ripple": ">= 0.8.x",
"react-native-dynamic-vector-icons": ">= x.x.x"

Basic Usage

<FloatingActionButton
    text="Share"
    iconName="md-share"
    iconType="Ionicons"
    iconColor="purple"
    textColor="purple"
    shadowColor="purple"
    rippleColor="purple"
/>

Example Application

  • I just shared the example project on Expo, simply run on your device to check what it is: via Expo OR check the code, and yes! :) all of the images, screenshots are directly taken from the this example. Of course, you can simply clone the project and run the example on your own environment.

Configuration - Props

BottomBar:
PropertyTypeDefaultDescription
stylestylecontaineruse this to change the main FAB's style
containerStylestylecontainerStyleuse this to change the main container style (Do not recommended!)
shadowStylestyleshadowStylechanges the FAB's current shadow style, you can implement your own shadow
materialShadowbooleanfalsemakes the special material shadow style like shown as example
sizenumber50use this to change FAB's whole size
backgroundColorcolor#FBFBFDuse this to change the main FAB's color
shadowColorcolor#B2B2B2use this to change FAB's shadow color
rippleColorcolorrgba(110, 157, 251, 1.0)use this to change FAB's ripple color
rippleContainerBorderRadiusnumber35use this to change FAB's ripple container border radius if you have a custom container style with different radius, you need to use this
disabledbooleanfalsedisabled the ripple effect
iconNamestringnull(will be fixed)changes the icon itself with using react-native-vectors
iconTypestringnull(will be fixed)changes the icon itself with using react-native-vectors
iconSizenumber30changes the inside of the icon's size
iconComponentcomponentIconit uses the react-native-dynamic-vector-icons' Icon component, you can implement your own component rather than Icon
textDisablebooleanfalseuse this to change disable bottom text, if you just need to use button itself
textstringnulluse this to change below text
textColorcolorsrgba(110, 157, 251, 1.0)use this to change below text color
textStylestyletextStyleuse this to change below text style itself

ToDos

  • LICENSE
  • New example with Screenshots!
  • Write an article about the lib on Medium |

Credits

Special thanks to n4kz, RN Material Ripple for bringing to life Floating Action Button :) Material Ripple should be on built-in feature in React Native.

Author

FreakyCoder, kurayogun@gmail.com

License

React Native Floating Action Button Library is available under the MIT license. See the LICENSE file for more info.

Keywords

FAQs

Last updated on 05 Nov 2019

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