Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@lucasmrc435/rn-fab

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lucasmrc435/rn-fab

Floating Action Button(FAB) for React Native

  • 0.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3
increased by200%
Maintainers
1
Weekly downloads
 
Created
Source

@lucasmrc435/rn-fab

React Native Floating Action Button

Floating Action Button

Install

Using npm

npm install @lucasmrc435/rn-fab --save

Using yarn

yarn add @lucasmrc435/rn-fab

Import

import FloatingActionButton from '@lucasmrc435/rn-fab'

Usage

    <FloatingActionButton 
    color="orange" 
    onPress={() => {
        console.log("FAB Pressed!");
    }}
    />

Example

import React from 'react';
import { View, Text } from 'react-native';

import FloatingActionButton from '@lucasmrc435/rn-fab'

const App = () => {
    return (
        <View> 
              <Text>Look at the FAB</Text>

              <FloatingActionButton 
                color="orange" 
                onPress={() => {
                    console.log("FAB Pressed!");
                }}
                />

                <FloatingActionButton 
                position="center"
                onPress={() => {
                    console.log("FAB Pressed!");
                }}
                />
                
                <FloatingActionButton 
                position="left"
                icon="wallet" 
                onPress={() => {
                    console.log("FAB Pressed!");
                }}
                />
        <View>
    );
}

Floating Action Button

Props

PropertyTypeDefaultDescription
colorString#049bdbFAB's Color
positionStringrightFAB's position
iconStringplusFAB's Icon
iconColorStringwhiteIcon's Color
OnPressFunctionnullFAB's onPress function

color

The color that will fill the FAB. Any color of StyleSheets and CSS

type : String

position

The FAB's position. Position can only be left | center | right

type : String

icon

The Icon that will appear inside the FAB. Any Icon from MaterialCommunityIcons

type : String

iconColor

The color that will fill the FAB's Icon

type : String

onPress

The function that is called when the button is activated.

type : Void Function

Keywords

FAQs

Package last updated on 28 May 2020

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc