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

react-native-floating-action-circle-button

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-floating-action-circle-button

Simple floating action button component with circle button for react native

  • 0.0.6
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
4
decreased by-55.56%
Maintainers
1
Weekly downloads
 
Created
Source

React native floating action circle button

Simple floating action button component with circle button for react native.

Demo

demoFloating

Installation

  npm install react-native-floating-action-circle-button

Usage/Examples

First step: import Component

import FloatingActionButton from 'react-native-floating-action-circle-button';

Second step: add actions list

const actions = [
  {
    icon: Assets.Icons.activeBin,
    label: 'Delete',
    disable: false,
    onPress: null,
  },
  {
    icon: Assets.Icons.inactiveCancelInvoice,
    label: 'Cancel',
    disable: true,
    onPress: null,
  },
  {
    icon: Assets.Icons.activeReport,
    label: 'Report',
    disable: false,
    onPress: null,
  },
];

Third step: place it in the screen

<FloatingActionButton 
  actions={actions}
  backgroundStyle={{
    marginRight: 17,
  }}
  actionButtonStyle={{
    marginRight: 17,
  }}
  anchorButtonStyle={{
    marginRight: 17,
  }}
/>

Props

PropertyTypeDefaultDescription
actionsArray<Object>[]Actions to be shown when user press the anchor Floating Button. Must pass at less one action
containerStylestylenullThe custom style for wrapper container
actionButtonStylestylenullThe custom style for actions button
backgroundStylestylenullThe custom style for background and disable
anchorInactiveIconImageSourcePropType...Icon to be rendered for anchor button when it's not pressed
anchorActiveIconImageSourcePropTypeXIcon to be rendered for anchor button when it is pressed
anchorButtonStylestylenullThe custom style for anchor button
anchorIconStylestylenullThe custom style for icon inside anchor button
actions props
PropertyTypeDefaultDescription
disableBooleanfalseActions status
labelstring``Label for action
onPressFunctionnullFunction to be called when action button is pressed. Can't press when disable is true
iconImageSourcePropTypenullIcon to be rendered inside action button
iconStylestylenullThe custom style for icon inside action button
buttonStylestylenullThe custom style for action button

License

MIT

Keywords

FAQs

Package last updated on 31 Aug 2022

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