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

react-native-action-floating-button

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-action-floating-button

A simple floating button for react native with nested button

  • 1.0.7
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
14
increased by55.56%
Maintainers
1
Weekly downloads
 
Created
Source

Example Image

Basic Usage

import {
  FloatingButton,
  FloatingButtonChild,
} from "react-native-action-floating-button";

const Floating = () => (
  <FloatingButton
    hasChildren={false}
    icon={<Text>{/*Here your Icon*/}</Text>}
    background="blue"
    onPress={() => foo()}
  />
);

Usage With Children

import {
  FloatingButton,
  FloatingButtonChild,
} from "react-native-action-floating-button";

const Floating = () => (
  <FloatingButton
    hasChildren={true}
    icon={<Text>{/*Here your Icon*/}</Text>}
    backgroundColor="blue"
  >
    <FloatingButtonChild backgroundColor="blue" title="Tooltip message">
      <Text>{/*Here your Icon*/}</Text>
    </FloatingButtonChild>
  </FloatingButton>
);

Props

Floating Child

OptionsDefaultValueHow To use
backgroundColorredrgb or hexUse to change the color of the button
hasChildrentruetrue, falseIf true instead of using onPress it opens the floatingButtonChild
onPressnonemethodUse to change the behavior when it's pressed with hasChildren on false.
iconnoneTextUse to display some text or icon
padding10NumberUse to add padding
alignItemsflex-endflex-start,center,flex-endUse to choose where you want to put the button
[children]noneCreate the FloatingButtonChild as children of a FloatingButton
shadownonecss styleUse to set the shadow of the button

FloatingButtonChild

OptionsDefaultValueHow To use
backgroundColorredrgb or hexUse to change the color of the button
titlenonestringUse to change the tooltip
[children]noneUse to change the icon or text of the button
shadownonecss styleUse to set the shadow of the button
flexDirectionrowrow, row-reverseSet to row-reverse to reverse the button and tooltip position

Bug

-Shadow Box during the fade in

ChangeLog:

  • Add Shadow on the button
  • Implemented button on right position

Keywords

FAQs

Package last updated on 20 Apr 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