0.2.2 • Published 5 years ago

react-native-floating-action-button v0.2.2

Weekly downloads
39
License
MIT
Repository
github
Last release
5 years ago

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

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.

0.2.2

5 years ago

0.2.1

5 years ago

0.2.0

5 years ago

0.1.14

5 years ago

0.1.13

5 years ago

0.1.12

5 years ago

0.1.11

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago

0.0.7

5 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago