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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@atom-design-mog/menu

v1.0.1

Published

A React Native login component for Menu.

Readme

@atom-design-mog/menu

A powerful, fully customizable Menu / Filter / Selection Component for React Native. Supports multiple modes: Search + Radio, Search + Checkbox, Search + Checkbox + Chips, and Input fields with footer CTA buttons. Part of the Atom Design System.


📦 Installation

Install with npm:

npm install @atom-design-mog/menu

Or with yarn:

yarn add @atom-design-mog/menu

🚀 Import

import Menu from '@atom-design-mog/menu';

🎉 Supported Types (Modes)

  • searchRadio — Searchable list with radio selection
  • searchCheckbox — Searchable list with checkbox selection + “Check All”
  • searchChipsCheckbox — Searchable list, checkbox selection with chips above the list
  • inputFooter — Two input fields with footer CTA buttons (Okay / Cancel)

⭐ Features

  • 🔍 Built-in search
  • 🎯 Radio selection
  • ☑️ Checkbox & multi-select with Check All and indeterminate states
  • 🏷 Dynamic chips (add / remove) in chips mode
  • 🔢 Input fields with footer actions (Apply / Cancel)
  • 📱 Native modal — perfect for Android & iOS
  • 🎨 Fully customizable styles
  • ✨ No external runtime dependencies

🧩 Props

| Prop | Type | Required | Description | | ---------------- | -------- | -------- | --------------------------------------------------------------------------------- | | label | string | No | Label shown above the trigger | | triggerText | string | Yes | Text displayed on menu trigger | | type | string | Yes | Menu mode (searchRadio, searchCheckbox, searchChipsCheckbox, inputFooter) | | options | Array | No | List of { label, value } options | | chips | Array | No | Used only in searchChipsCheckbox | | onSelect | function | No | Returns selected value(s) | | onAddChip | function | No | Callback when new chip is added | | onRemoveChip | function | No | Called when user removes chip | | onApply | function | No | Used in inputFooter mode to return inputs | | onCancel | function | No | Called when cancel pressed |


📘 Basic Examples

Search + Radio

<Menu
  label="Choose Fruit"
  triggerText={value || 'Search & Select'}
  type="searchRadio"
  options={[{ label: 'Apple', value: 'Apple' }, { label: 'Orange', value: 'Orange' }]}
  onSelect={setValue}
/>

Search + Checkbox

<Menu
  label="Multi-Select"
  triggerText="Pick Items"
  type="searchCheckbox"
  options={options}
  onSelect={(values) => console.log(values)}
/>

Search + Chips Checkbox

<Menu
  label="Tags"
  triggerText="Search + Chips"
  type="searchChipsCheckbox"
  chips={chips}
  options={options}
  onSelect={setSelected}
  onAddChip={(chip) => setChips([...chips, chip])}
  onRemoveChip={(chip) => setChips(chips.filter(c => c !== chip))}
/>

Input + Footer Buttons

<Menu
  label="Quantity Range"
  triggerText="Enter Range"
  type="inputFooter"
  onApply={(data) => console.log('Applied:', data)}
  onCancel={() => console.log('Cancelled')}
/>

🧪 Full Test Screen (Recommended)

import React, { useState } from 'react';
import { View, Text, ScrollView } from 'react-native';
import Menu from '@atom-design-mog/menu';

export default function TestMenusScreen() {
  const [radioValue, setRadioValue] = useState('');
  const [checkboxValue, setCheckboxValue] = useState([]);
  const [chipsCheckboxValue, setChipsCheckboxValue] = useState([]);
  const [chips, setChips] = useState(['Chip 1', 'Chip 2']);
  const [inputValues, setInputValues] = useState({});

  const options = [
    { label: 'Option 1 - Apple', value: 'Apple' },
    { label: 'Option 2 - Banana', value: 'Banana' },
    { label: 'Option 3 - Cherry', value: 'Cherry' },
    { label: 'Option 4 - Orange', value: 'Orange' },
  ];

  const handleAddChip = chip => {
    if (chip && !chips.includes(chip)) setChips([...chips, chip]);
  };

  const handleRemoveChip = chip => setChips(chips.filter(c => c !== chip));

  return (
    <ScrollView style={{ flex: 1 }}>
      <View style={{ padding: 20, gap: 24 }}>
        <Text>Menu Search + Radio</Text>
        <Menu label="Label" triggerText={radioValue || 'Search with radio'} type="searchRadio" options={options} onSelect={setRadioValue} />

        <Text>Menu Search + Checkbox</Text>
        <Menu label="Label" triggerText={checkboxValue.length > 0 ? `Selected: ${checkboxValue.length}` : 'Search with checkbox'} type="searchCheckbox" options={options} onSelect={setCheckboxValue} />

        <Text>Menu Search + Chips Checkbox</Text>
        <Menu label="Label" triggerText="Search + Chips" type="searchChipsCheckbox" options={options} chips={chips} onSelect={setChipsCheckboxValue} onAddChip={handleAddChip} onRemoveChip={handleRemoveChip} />

        <Text>Menu with Input & Footer Buttons</Text>
        <Menu label="Quantity Input" triggerText="Open Menu" type="inputFooter" onApply={(data) => setInputValues(data)} onCancel={() => console.log('Cancelled')} />
      </View>
    </ScrollView>
  );
}

👤 Author

Avi Gupta