---
title: Menubar
description: A visually persistent menu common in desktop applications that provides quick access to a consistent set of commands.

link:
  doc: https://kobalte.dev/docs/core/components/menubar
  api: https://kobalte.dev/docs/core/components/menubar#api-reference
---

<ComponentPreview name="menubar-demo">

```tsx file=<rootDir>/apps/docs/src/registry/examples/menubar-demo.tsx

```

</ComponentPreview>

## Installation

<ComponentInstallation>

<Step>

<StepItem>Copy and paste the following code into your project:</StepItem>

  <ComponentSourceTabs>

    ```tsx title="components/ui/menubar" file=<rootDir>/apps/docs/src/registry/ui/menubar.tsx

    ```

    ```tsx title="components/ui/menubar" file=<rootDir>/apps/unocss-playground/src/registry/ui/menubar.tsx

    ```

  </ComponentSourceTabs>

</Step>

</ComponentInstallation>

## Usage

```tsx
import {
  Menubar,
  MenubarContent,
  MenubarItem,
  MenubarMenu,
  MenubarPortal,
  MenubarSeparator,
  MenubarTrigger,
} from "@/components/ui/menubar"
```

```tsx
<Menubar>
  <MenubarMenu>
    <MenubarTrigger />
    <MenubarPortal>
      <MenubarContent>
        <MenubarItem />
        <MenubarSeparator />
        <MenubarItem />
      </MenubarContent>
    </MenubarPortal>
  </MenubarMenu>
</Menubar>
```
