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

orbit-kit-ui

v1.0.3

Published

A modern, versatile React Native component library with smooth animations, responsive layouts, and intuitive design, perfect for building clean and futuristic mobile interfaces.

Downloads

244

Readme

Orbit Kit UI

orbit-kit-ui A modern, versatile React Native component library with smooth animations, responsive layouts, and intuitive design, perfect for building clean and futuristic mobile interfaces.

MenuRotaryOrbit Component

A customizable and animated menu component for React Native that arranges menu items in a circular or semi-circular pattern, providing options for center content, gesture handling, and opacity effects.

Check out this examples!

| Example 1 | Example 2 | Example 3 | Example 4 | |-----------------------|-----------------------|-----------------------|-----------------------| | Example1 | Example2 | Example3 | Example4

Features

  • Circular and Semi-Circular Arrangements: Display menu items around a circular or semi-circular path.
  • Animated Gestures: Rotate the menu using gestures with customizable animations.
  • Center Content: Include a centered item, optionally rotating with the menu.
  • Opacity Layer: Optional opacity effect with customizable properties.
  • Highly Configurable: Easily configure properties like size, radius, animation, and more.

Table of Contents

  1. Installation
  2. Usage
  3. API Reference
  4. Author

Installation

To use MenuRotaryOrbit, make sure you have the following dependencies installed:

To use the library orbit-kit-ui, install it together with react-native-gesture-handler and react-native-reanimated

npm i orbit-kit-ui
# or
yarn add orbit-kit-ui

Usage

Example in TSX

import { StatusBar } from 'expo-status-bar';
import { Pressable, StyleSheet, Text } from 'react-native';
import MenuApp from './src/MenuApp';
import { GestureHandlerRootView } from 'react-native-gesture-handler';
import { useState } from 'react';


export function Item(emoji: string, onPress: () => void): React.JSX.Element {
  return(
    <Pressable 
      onPress={onPress} 
      style={{
        width: 50, 
        height: 50, 
        backgroundColor: 'white', 
        borderRadius: 100,
        justifyContent: "center",
        alignItems: "center",
        borderWidth: 0.3
      }}
    >
      <Text style={{fontSize: 24}}>{emoji}</Text>
    </Pressable>
  )
}

export default function App() {
  const [isOpen, setIsOpen] = useState<boolean>(false)

  const content: React.JSX.Element[] = [
    Item("😁", () => alert("😁")),
    Item("😒", () => alert("😒")),
    Item("😊", () => alert("😊")),
    Item("😂", () => alert("😂"))
  ]

  return (
    <GestureHandlerRootView style={styles.container}>
      <StatusBar style="auto" />
      <MenuApp
        coreContent={Item("😂", () => setIsOpen(!isOpen))}
        content={content}
        isOpenMenu={isOpen}
      />
    </GestureHandlerRootView>
  );
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    backgroundColor: '#fff',
    alignItems: 'center',
    justifyContent: 'center',
  }
});

API Reference

IMenuProps

Properties for configuring the MenuApp component:

| Property | Type | Description | |-----------------------|-----------------------------------|----------------------------------------------------------------| | isOpenMenu | boolean | Determines if the menu is open. | | content | JSX.Element[] or string[] | Array of content items to display in the menu. | | contentStyles | ViewStyle & ViewProps | Additional styles for the content container. | | contentItemStyle | ViewStyle & ViewProps | Styles for individual content items. | | coreContent | JSX.Element | Center element to display in the menu. | | centerContentSize | number | Size of the center content element. | | centerContainerStyle| ViewStyle & ViewProps | Styles for the center content container. | | centerRotateContent | boolean | Enables rotation of the center content with the menu. | | animationEntering | Entering/animations | Animation configuration for menu entry. | | animationExiting | Exiting/animations | Animation configuration for menu exit. | | radiusMenus | number | Multiplier for the menu radius. | | isOpacityMenu | boolean | Enables an opacity effect overlay. | | opacityProps | IOpacityApp | Custom properties for the opacity effect. | | isSemicircle | boolean | Configures menu layout as a semi-circle. | | actionOpacity | () => void | Function triggered when opacity is pressed. |

Example

<MenuRotaryOrbit
  isOpenMenu={isOpen}
  content={content}
  contentStyles={{
    marginBottom: 10
  }}
  contentItemStyle={{
    backgroundColor: 'red',
  }}
  coreContent={Item("😂", () => setIsOpen(!isOpen))}
  centerContentSize={10}
  centerContainerStyle={{
    backgroundColor: 'green',
  }}
  centerRotateContent={false}
  animationEntering={BounceIn}
  animationExiting={BounceOut}
  radiusMenus={1.5}
  isOpacityMenu={true}
  opacityProps={{
    opacity: 0.9,
    color: 'black'
  }}
  isSemicircle={false}
  actionOpacity={() => setIsOpen(!isOpen)}
/>

IOpacityApp

Properties for managing opacity effects:

| Property | Type | Description | |-----------------------|---------------|----------------------------------------------------------------| | color | string | Optional background color. | | opacity | 0-1 | Opacity level between 0 and 1. |

Example

<MenuRotaryOrbit
  opacityProps={{
    opacity: 0.6,
    color: 'black'
  }}
/>

Author

© 2024 Gilcenio Santos Vilanova Junior. All rights reserved.