# @gluestack-ui/menu

> A universal headless menu component for React Native, Next.js & React

Latest version **0.2.43** (published 2025-03-11) · 0 weekly downloads

## Install

```sh
npm install @gluestack-ui/menu
pnpm add @gluestack-ui/menu
yarn add @gluestack-ui/menu
bun add @gluestack-ui/menu
```

## Health

**Score 50/100 (C)** — status: stable.

Positive: has types; esm support; no vulnerabilities; high maintenance score.

Warnings: low downloads; pre 1.0.

Negative: stale.

## Facts

| | |
|---|---|
| Version | 0.2.43 |
| Published | 2025-03-11 |
| First published | 2023-02-21 |
| Weekly downloads | 0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 11 |
| Unpacked size | 55.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 5300 |
| Maintainers | vidhi499, rohit_singh, viraj-10, rayan1810, rajat693, surajahmedc, meenumakkar, madhavb230100, vaibhk002, daminipandey, amars29, geekgautam, sravankumarvelangi, gluestackadmin, geekashwini, mayankp06 |
| Keywords | react, native, react-native, menu, gluestack-ui, universal, headless, typescript, component, android, ios, nextjs |

## Links

- npm: https://www.npmjs.com/package/@gluestack-ui/menu
- Repository: https://github.com/gluestack/gluestack-ui
- Homepage: https://github.com/gluestack/gluestack-ui/tree/main/packages/unstyled/menu#readme
- Issues: https://github.com/gluestack/gluestack-ui/issues
- npm.io page: https://npm.io/package/@gluestack-ui/menu

## Dependencies (11)

- [react-stately](https://npm.io/package/react-stately.md) ^3.21.0
- [@react-aria/menu](https://npm.io/package/@react-aria/menu.md) ^3.14.1
- [@gluestack-ui/hooks](https://npm.io/package/@gluestack-ui/hooks.md) 0.1.13
- [@gluestack-ui/utils](https://npm.io/package/@gluestack-ui/utils.md) ^0.1.15
- [@react-aria/overlays](https://npm.io/package/@react-aria/overlays.md) ^3.19.0
- [@react-stately/utils](https://npm.io/package/@react-stately/utils.md) ^3.6.0
- [@gluestack-ui/overlay](https://npm.io/package/@gluestack-ui/overlay.md) ^0.1.22
- [@react-native-aria/menu](https://npm.io/package/@react-native-aria/menu.md) 0.2.15
- [@react-native-aria/focus](https://npm.io/package/@react-native-aria/focus.md) ^0.2.9
- [@react-native-aria/overlays](https://npm.io/package/@react-native-aria/overlays.md) ^0.3.15
- [@react-native-aria/interactions](https://npm.io/package/@react-native-aria/interactions.md) 0.2.16

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 0.2.43 (latest) — 2025-03-11
- 0.2.18-alpha.0 (alpha) — 2023-09-09
- 0.2.42 — 2025-03-03
- 0.2.41 — 2025-02-19
- 0.2.40 — 2025-02-18
- 0.2.39 — 2025-02-18
- 0.2.38 — 2025-02-18
- 0.2.37 — 2024-11-11
- 0.2.36 — 2024-07-31
- 0.2.35 — 2024-07-31
- 0.2.34 — 2024-07-08
- 0.2.33 — 2024-04-03
- 0.2.32 — 2024-03-21
- 0.2.31 — 2024-03-18
- 0.2.30 — 2024-02-27
- … 38 more at https://npm.io/package/@gluestack-ui/menu/versions

## README

# `@gluestack-ui/menu`

The Menu component creates a user-friendly dropdown interface that can be utilized to present a range of options or actions. This feature ensures accessibility and ease of use for the user.

## Installation

To install the component, run the following command in your terminal. This will add the component to your project's dependencies and allow you to use it in your project.

```sh
npx install @gluestack-ui/menu
```

## Usage

Default styling of all these components can be found in the components/core/menu file. For reference, you can view the [source code](https://github.com/gluestack/gluestack-ui/blob/main/example/storybook/src/ui-components/Menu/styled-components/index.tsx) of the styled Menu components.

```jsx
// import the styles
import {
  Root,
  Item,
  Label,
  Backdrop,
} from '../components/core/menu/styled-components';

// import the createMenu function
import { createMenu } from '@gluestack-ui/menu';

// Understanding the API
const Menu = createMenu({
  Root,
  Item,
  Label,
  Backdrop,
});

// Using the menu component
export default () => (
  <Menu>
    <MenuItem>
      <MenuItemLabel />
    </MenuItem>
  </Menu>
);
```

More guides on how to get started are available
[here](https://ui.gluestack.io/docs/).

---
_Source: https://npm.io/package/@gluestack-ui/menu · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
