npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

greact-circular-action-menu

v0.3.0

Published

customizable circular action menu component for react-native

Downloads

3

Readme

great-circular-action-menu

Path-esque circular action menu inspired by CircularFloatingActionMenu.

Origin name is "greact-circular-action-menu", but we need to fork this project and do customize for our specific business purpose

greact-circular-action-menu demo

Installation

npm i greact-circular-action-menu --save

Usage

First, require it from your app's JavaScript files with:

import ActionButton from 'greact-circular-action-menu';
ActionButton

ActionButton component is the main component which wraps everything and provides a couple of props (see Config below).

ActionButton.Item

ActionButton.Item specifies an Action Button. You have to include at least 1 ActionButton.Item.

Example

The following Basic example can be found in example/Basic.

import React, { Component, StyleSheet, View } from 'react-native';
import ActionButton from 'greact-circular-action-menu';
import Icon from 'react-native-vector-icons/Ionicons';


class App extends Component {

  render() {
    return (
      <View style={{flex:1, backgroundColor: '#f3f3f3'}}>
        {/*Rest of App come ABOVE the action button component!*/}
        <ActionButton buttonColor="rgba(231,76,60,1)">
          <ActionButton.Item buttonColor='#9b59b6' title="New Task" onPress={() => console.log("notes tapped!")}>
            <Icon name="android-create" style={styles.actionButtonIcon} />
          </ActionButton.Item>
          <ActionButton.Item buttonColor='#3498db' title="Notifications" onPress={() => {}}>
            <Icon name="android-notifications-none" style={styles.actionButtonIcon} />
          </ActionButton.Item>
          <ActionButton.Item buttonColor='#1abc9c' title="All Tasks" onPress={() => {}}>
            <Icon name="android-done-all" style={styles.actionButtonIcon} />
          </ActionButton.Item>
        </ActionButton>
      </View>
    );
  }

}

const styles = StyleSheet.create({
  actionButtonIcon: {
    fontSize: 20,
    height: 22,
    color: 'white',
  },
});

This will create a floating Button in the bottom right corner with 3 action buttons. Also this example uses react-native-vector-icons for the button Icons.

FAB Example

<ActionButton
  buttonColor="rgba(231,76,60,1)"
  onPress={() => { console.log("hi")}}
/>

Configuration

ActionButton:

| Property | Type | Default | Description | | ------------- |:-------------:|:------------: | ----------- | | active | boolean | false | action buttons visible or not | autoInactive | boolean | true | Auto hide ActionButtons when ActionButton.Item is pressed. | position | string | "center" | one of: left center and right | radiua | number | 100 | radius of menu | bgColor | string | "transparent" | color of overlay when ActionButtons are visible | buttonColor | string | "rgba(0,0,0,1)" | background color of the +Button (must be rgba value!) | btnOutRange | string | props.buttonColor | button background color to animate to | outRangeScale | number | 1 | changes size of button during animation | onPress | function | null | fires, when ActionButton is tapped | onLongPress | function | null | fires, when ActionButton is long pressed | onOverlayPress | function | null | fires, when Overlay is pressed | icon | Component | + | Custom component for ActionButton Icon | backdrop | Component | false | Custom component for use as Backdrop (i.e. BlurView, VibrancyView) | degrees | number | 135 | degrees to rotate icon | tooltip | string | nul | text of tooltip | tooltipColor | string | white | color of tooltip | last | boolean | false | flag for determine the latest item to adjust styling incase position of ActionButton is right

ActionButton.Item:

| Property | Type | Default | Description | | ------------- |:-------------:|:------------: | ----------- | | onPress | func | null | required function, triggers when a button is tapped | buttonColor | string | same as + button | background color of the Button