Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
rn-floating-menu
Advanced tools
A customizable floating menu component for React Native with animated background functionality.
Install the package using npm or yarn:
npm install rn-floating-menu
# or
yarn add rn-floating-menu
Watch the demo video to see how the react-native-floating-menu
works: Link to Demo Video
import { FloatingMenu } from "rn-floating-menu";
const actionMenus = [
{
title: "Menu1",
icon: "menu1_icon",
handler: () => console.log("Menu1"),
},
{
title: "Menu2",
icon: "menu2_icon",
handler: () => console.log("Menu2"),
},
];
<FloatingMenu actionMenus={actionMenus} />;
<FloatingMenu
actionMenus={actionMenus}
subActionButtonStyle={{ backgroundColor: "red" }}
backShadow={true}
subActionTextStyle={{ color: "yellow" }}
backShadowStyle={{ backgroundColor: "rgba(0, 0, 0, 0.7)" }}
mainActionButtonStyle={{ backgroundColor: "green" }}
subActionContainerStyle={{ bottom: 100, right: 50 }}
/>
Prop | Type | Required | Description |
---|---|---|---|
actionMenus | array | Yes | An array of menu items to display. Each item should be an object with title , icon , and handler . |
subActionButtonStyle | object | No | Custom styles for the submenu buttons. |
backShadow | boolean | No | Enables/disables the background shadow animation when the menu expands. Default is false . |
subActionTextStyle | object | No | Custom styles for the submenu text. |
backShadowStyle | object | No | Custom styles for the background shadow. |
mainActionButtonStyle | object | No | Custom styles for the main action button. |
subActionContainerStyle | object | No | Custom styles for the submenu container. |
actionMenus
ExampleEach object in the actionMenus
array should have the following properties:
title
: (string) The title text to display for the menu item.icon
: (string) The name of the icon to display for the menu item. Ensure that the icon name is compatible with the react-native-vector-icons
library.handler
: (function) The function to be executed when the menu item is pressed.You can customize various parts of the floating menu using the optional props. Here’s an example showing how to customize the appearance of the submenu and the background shadow:
<FloatingMenu
actionMenus={actionMenus}
subActionButtonStyle={{ backgroundColor: "red" }}
backShadow={true}
subActionTextStyle={{ color: "yellow" }}
backShadowStyle={{ backgroundColor: "rgba(0, 0, 0, 0.7)" }}
mainActionButtonStyle={{ backgroundColor: "green" }}
subActionContainerStyle={{ bottom: 100, right: 50 }}
/>
FAQs
react native floating menu
The npm package rn-floating-menu receives a total of 18 weekly downloads. As such, rn-floating-menu popularity was classified as not popular.
We found that rn-floating-menu demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
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.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.