Menu Bar Commands
Getting Started
{
"name": "github-pull-requests",
"title": "Pull Requests",
"subtitle": "GitHub",
"description": "See your GitHub pull requests at a glance",
"mode": "menu-bar"
},import { MenuBarExtra } from "@raycast/api";
export default function Command() {
return (
<MenuBarExtra icon="https://github.githubassets.com/favicons/favicon.png" tooltip="Your Pull Requests">
<MenuBarExtra.Item title="Seen" />
<MenuBarExtra.Item
title="Example Seen Pull Request"
onAction={() => {
console.log("seen pull request clicked");
}}
/>
<MenuBarExtra.Item title="Unseen" />
<MenuBarExtra.Item
title="Example Unseen Pull Request"
onAction={() => {
console.log("unseen pull request clicked");
}}
/>
</MenuBarExtra>
);
}


Lifecycle
From the root search
At a set interval
When the user clicks the command's icon / title in the menu bar
When Raycast is restarted
When a menu bar command is re-enabled in preferences
Best practices
API Reference
MenuBarExtra
Example
Props
Prop
Description
Type
Default
MenuBarExtra.Item
Example
Props
Prop
Description
Type
Default
MenuBarExtra.Submenu
Example
Props
Prop
Description
Type
Default
MenuBarExtra.Section
Example
Props
Prop
Description
Type
Default
Types
MenuBarExtra.ActionEvent
Properties
Property
Description
Type
Example
Last updated


