Socket
Socket
Sign inDemoInstall

react-native-action-floating-button

Package Overview
Dependencies
0
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

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


Version published
Maintainers
1
Weekly downloads
7
decreased by-22.22%

Weekly downloads

Readme

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

Last updated on 20 Apr 2020

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