# Shadcn Checkbox & Radio

> Menubar with checkbox & radio items.

- Type: example, free and open source (MIT)
- Component: [Menubar](https://reui.io/components/menubar.md)
- Page: https://reui.io/components/menubar/c-menubar-3
- Docs (Base UI): https://ui.shadcn.com/docs/components/base/menubar.md
- Docs (Radix UI): https://ui.shadcn.com/docs/components/radix/menubar.md
- MCP: `get_example("c-menubar-3")`
- Registry item: https://reui.io/r/styles/base-nova/c-menubar-3.json
- Uses: Menubar

## Best for

A View list of 2 browser toggles beside a Theme list whose Light, Dark or System pick is held in state

## Agent notes

- `theme` only moves the radio tick; hand the Light, Dark or System pick to your theme provider
- Neither `MenubarCheckboxItem` is held in state, so Full URLs never unticks and on radix Bookmarks Bar never ticks

## When not to use

- Browser view toggles opened with a right click on the page, with no top bar: use [Context Menu](https://reui.io/components/context-menu.md) (`get_component("context-menu")`)
- Options a user ticks inside a form that is always on screen: use [Checkbox](https://reui.io/components/checkbox.md) (`get_component("checkbox")`)

## Install

```bash
npx shadcn@latest add @reui/c-menubar-3
```

## About Shadcn Menubar

### When to use

- Desktop style command bars of File, Edit and Account lists, with key hints and side flyouts
- Formatting and insert lists for a document editor, such as Bold, Italic, Media and Link
- View toggles and a single choice setting kept in the top bar, such as bookmarks or the theme

### When not to use

- A single list of actions or account options opened from one button: use [Dropdown Menu](https://reui.io/components/dropdown-menu.md) (`get_component("dropdown-menu")`)
- Commands opened by right clicking a file, row or canvas, with no visible trigger: use [Context Menu](https://reui.io/components/context-menu.md) (`get_component("context-menu")`)
- A signed in product header holding the logo, search, alerts and the user avatar: use the [Navbar blocks](https://reui.io/blocks/application/navbar.md)

### Agent notes

- Give each `MenubarItem` its command through onClick, which both twins fire; Base UI never fires the Radix onSelect event
- `MenubarShortcut` is a plain span that prints the chord only; register the keys in your own keydown listener
- `MenubarLabel` throws on the base twin unless it sits inside a `MenubarGroup` or `MenubarRadioGroup`

Every ReUI item has a twin like this one; the index is https://reui.io/llms.txt. Agents with the ReUI MCP (https://reui.io/docs/mcp) get the same guidance from the getters named above.
