Founding price: $35, then $99 after 23:59 UTC on 4 November, then $99
Get ProA Recent menu built from a changing list that never shows empty: one disabled line explains an empty history and Clear recent sits apart and disables itself.
This item has no props to tune. Use the lens above to change theme, density, direction and more.
Use this for a File or Go menu where the contents come from usage history: documents, projects, searches.
Do not use it for more than ten entries or for data that must always be reachable elsewhere: history can be cleared.
It builds on button and dropdown-menu, which the CLI installs for you.
import { MenuRecentItems } from "@/components/menu-recent-items"<MenuRecentItems
items={recent}
onOpen={(id) => open(id)}
onClear={() => setRecent([])}
/>| Prop | Type | Default | Description |
|---|---|---|---|
items | { id, label }[] | - | Most recent first. |
onOpen | (id: string) => void | - | Called when an item is chosen. |
onClear | () => void | - | Called by Clear recent. |
menuitems; opening one is up to onOpen (move it to the top, navigate).| Key | Action |
|---|---|
| Enter, Space or ArrowDown | opens the menu |
| Arrow keys and typeahead | move between items |
| Enter | opens an item |
The pattern ships a Testing Library test (menu-recent-items.test.tsx) that covers the list, reordering after opening, clearing and the empty explanation.