- Name
service- Kind
- parameter
- Type
MenubarService- Requirement
- required
Docs/API reference/Headless/menubar
menubar headless API
The core connector and vanilla mount are always visible. Use the framework choice to inspect native composition, props, outputs, context and hooks for the selected adapter.
@grassroot/ui-headless-core/menubar
Core connector and vanilla API
packages/ui-headless/core/src/menubar/index.ts
activateMenubarLayer
functiondeclare function activateMenubarLayer(service: MenubarService, scope: PartScope, doc: Document): () => void;serviceMenubarServicescopePartScopedocDocumentreturn() => void- Name
scope- Kind
- parameter
- Type
PartScope- Requirement
- required
- Name
doc- Kind
- parameter
- Type
Document- Requirement
- required
- Name
return- Kind
- return value
- Type
() => void- Requirement
- n/a
connectMenubar
functiondeclare function connectMenubar(service: MenubarService, scope: PartScope, options?: MenubarConnectOptions): MenubarApi;serviceMenubarServicescopePartScopeoptionsMenubarConnectOptionsreturnMenubarApi- Name
service- Kind
- parameter
- Type
MenubarService- Requirement
- required
- Name
scope- Kind
- parameter
- Type
PartScope- Requirement
- required
- Name
options- Kind
- parameter
- Type
MenubarConnectOptions- Requirement
- optional
- Name
return- Kind
- return value
- Type
MenubarApi- Requirement
- n/a
MenubarActionable
interfaceinterface MenubarActionable { readonly id: string; readonly disabled?: boolean; readonly textValue?: string;}disabledbooleanidstringtextValuestring- Name
disabled- Kind
- property
- Type
boolean- Requirement
- optional
- Name
id- Kind
- property
- Type
string- Requirement
- required
- Name
textValue- Kind
- property
- Type
string- Requirement
- optional
menubarAnatomy
valueexport declare const menubarAnatomy: { readonly scope: "menubar"; readonly parts: readonly ["root", "trigger", "content", "item", "separator", "sub-trigger", "sub-content"];};partsreadonly ["root", "trigger", "content", "item", "separator", "sub-trigger", "sub-content"]scope"menubar"- Name
parts- Kind
- property
- Type
readonly ["root", "trigger", "content", "item", "separator", "sub-trigger", "sub-content"]- Requirement
- required
- Name
scope- Kind
- property
- Type
"menubar"- Requirement
- required
MenubarApi
interfaceinterface MenubarApi { rootProps(): PartProps; triggerProps(menu: MenubarMenu): PartProps; contentProps(menuValue: string): PartProps; itemProps(menuValue: string, item: MenubarActionable): PartProps; separatorProps(menuValue?: string): PartProps; subTriggerProps(key?: string): PartProps; subContentProps(key?: string): PartProps; resolveSubmenuPointerIntent(input: SubmenuPointerIntentInput): ReturnType<typeof resolveSubmenuPointerIntent>; readonly open: boolean; readonly value: string | null;}contentProps(menuValue: string) => PartPropsitemProps(menuValue: string, item: MenubarActionable) => PartPropsopenbooleanresolveSubmenuPointerIntent(input: SubmenuPointerIntentInput) => ReturnType<typeof resolveSubmenuPointerIntent>rootProps() => PartPropsseparatorProps(menuValue?: string) => PartPropssubContentProps(key?: string) => PartPropssubTriggerProps(key?: string) => PartPropstriggerProps(menu: MenubarMenu) => PartPropsvaluestring | null- Name
contentProps- Kind
- method
- Type
(menuValue: string) => PartProps- Requirement
- required
- Name
itemProps- Kind
- method
- Type
(menuValue: string, item: MenubarActionable) => PartProps- Requirement
- required
- Name
open- Kind
- property
- Type
boolean- Requirement
- required
- Name
resolveSubmenuPointerIntent- Kind
- method
- Type
(input: SubmenuPointerIntentInput) => ReturnType<typeof resolveSubmenuPointerIntent>- Requirement
- required
- Name
rootProps- Kind
- method
- Type
() => PartProps- Requirement
- required
- Name
separatorProps- Kind
- method
- Type
(menuValue?: string) => PartProps- Requirement
- required
- Name
subContentProps- Kind
- method
- Type
(key?: string) => PartProps- Requirement
- required
- Name
subTriggerProps- Kind
- method
- Type
(key?: string) => PartProps- Requirement
- required
- Name
triggerProps- Kind
- method
- Type
(menu: MenubarMenu) => PartProps- Requirement
- required
- Name
value- Kind
- property
- Type
string | null- Requirement
- required
MenubarChangeReason
typetype MenubarChangeReason = MenubarOpenReason | MenubarCloseReason;MenubarCommand
typetype MenubarCommand = CommandObject & ({ readonly type: "VALUE_CHANGE_REQUEST"; readonly value: string | null; readonly reason: MenubarChangeReason;} | { readonly type: "SELECT_ITEM"; readonly menuValue: string; readonly id: string;} | { readonly type: "FOCUS_TRIGGER"; readonly key: string;});MenubarConnectOptions
interfaceinterface MenubarConnectOptions { readonly dir?: "ltr" | "rtl";}dir"ltr" | "rtl"- Name
dir- Kind
- property
- Type
"ltr" | "rtl"- Requirement
- optional
MenubarContext
typetype MenubarContext = { readonly mode: "controlled" | "uncontrolled"; /** The one committed open-menu binding; null means all menus are closed. */ readonly value: string | null; /** Original index into the current menu's item list. */ readonly highlightedIndex: number; /** Roving-focus target among top-level triggers. */ readonly focusedValue: string | null;};focusedValuestring | nullhighlightedIndexnumbermode"controlled" | "uncontrolled"valuestring | null- Name
focusedValue- Kind
- property
- Type
string | null- Requirement
- required
- Description
- Roving-focus target among top-level triggers.
- Name
highlightedIndex- Kind
- property
- Type
number- Requirement
- required
- Description
- Original index into the current menu's item list.
- Name
mode- Kind
- property
- Type
"controlled" | "uncontrolled"- Requirement
- required
- Description
- —
- Name
value- Kind
- property
- Type
string | null- Requirement
- required
- Description
- The one committed open-menu binding; null means all menus are closed.
MenubarDivider
interfaceinterface MenubarDivider { readonly divider: true;}dividertrue- Name
divider- Kind
- property
- Type
true- Requirement
- required
MenubarEvent
typetype MenubarEvent = { readonly type: "OPEN_MENU"; readonly value: string; readonly reason: MenubarOpenReason;} | { readonly type: "TOGGLE_MENU"; readonly value: string; readonly reason: "trigger";} | { readonly type: "CLOSE"; readonly reason: MenubarCloseReason;} | { readonly type: "MOVE_TRIGGER"; readonly direction: -1 | 1;} | { readonly type: "MOVE_ITEM"; readonly direction: -1 | 1;} | { readonly type: "HIGHLIGHT"; readonly index: number;} | { readonly type: "SELECT";} | { readonly type: "FOCUS_TRIGGER"; readonly value: string;};MenubarInput
typetype MenubarInput = { readonly menus: readonly MenubarMenu[]; /** Controlled open-menu value. Defining it fixes controlled mode at start. */ readonly value?: string | null; /** Uncontrolled initial open-menu value. */ readonly defaultValue?: string | null;};defaultValuestring | nullmenusreadonly MenubarMenu[]valuestring | null- Name
defaultValue- Kind
- property
- Type
string | null- Requirement
- optional
- Description
- Uncontrolled initial open-menu value.
- Name
menus- Kind
- property
- Type
readonly MenubarMenu[]- Requirement
- required
- Description
- —
- Name
value- Kind
- property
- Type
string | null- Requirement
- optional
- Description
- Controlled open-menu value. Defining it fixes controlled mode at start.
MenubarItem
typetype MenubarItem = MenubarActionable | MenubarDivider;menubarMachine
valueexport declare const menubarMachine: MenubarMachine;MenubarMenu
interfaceinterface MenubarMenu { readonly value: string; readonly items: readonly MenubarItem[];}itemsreadonly MenubarItem[]valuestring- Name
items- Kind
- property
- Type
readonly MenubarItem[]- Requirement
- required
- Name
value- Kind
- property
- Type
string- Requirement
- required
MenubarMount
interfaceinterface MenubarMount { readonly service: MenubarService; readonly connector: MenubarApi; readonly root: HTMLElement; destroy(): void;}connectorMenubarApidestroy() => voidrootHTMLElementserviceMenubarService- Name
connector- Kind
- property
- Type
MenubarApi- Requirement
- required
- Name
destroy- Kind
- method
- Type
() => void- Requirement
- required
- Name
root- Kind
- property
- Type
HTMLElement- Requirement
- required
- Name
service- Kind
- property
- Type
MenubarService- Requirement
- required
menubarNavigableIndices
functionEquivalent to the frozen `menubarNavigableIndices` helper.
declare function menubarNavigableIndices(items: readonly MenubarItem[]): readonly number[];itemsreadonly MenubarItem[]returnreadonly number[]- Name
items- Kind
- parameter
- Type
readonly MenubarItem[]- Requirement
- required
- Name
return- Kind
- return value
- Type
readonly number[]- Requirement
- n/a
MenubarOpenChangeDetail
interfaceinterface MenubarOpenChangeDetail { readonly value: string | null; readonly reason: MenubarChangeReason;}reasonMenubarChangeReasonvaluestring | null- Name
reason- Kind
- property
- Type
MenubarChangeReason- Requirement
- required
- Name
value- Kind
- property
- Type
string | null- Requirement
- required
MenubarOpenReason
typetype MenubarOpenReason = "trigger" | "pointer" | "keyboard" | "programmatic";MenubarPart
typetype MenubarPart = (typeof parts)[number];menubarSelectors
valueexport declare const menubarSelectors: { value: (snapshot: MenubarSnapshot) => string | null; open: (snapshot: MenubarSnapshot) => boolean; highlightedIndex: (snapshot: MenubarSnapshot) => number; focusedValue: (snapshot: MenubarSnapshot) => string | null; isOpen: (snapshot: MenubarSnapshot, value: string) => boolean;};focusedValue(snapshot: MenubarSnapshot) => string | nullhighlightedIndex(snapshot: MenubarSnapshot) => numberisOpen(snapshot: MenubarSnapshot, value: string) => booleanopen(snapshot: MenubarSnapshot) => booleanvalue(snapshot: MenubarSnapshot) => string | null- Name
focusedValue- Kind
- property
- Type
(snapshot: MenubarSnapshot) => string | null- Requirement
- required
- Name
highlightedIndex- Kind
- property
- Type
(snapshot: MenubarSnapshot) => number- Requirement
- required
- Name
isOpen- Kind
- property
- Type
(snapshot: MenubarSnapshot, value: string) => boolean- Requirement
- required
- Name
open- Kind
- property
- Type
(snapshot: MenubarSnapshot) => boolean- Requirement
- required
- Name
value- Kind
- property
- Type
(snapshot: MenubarSnapshot) => string | null- Requirement
- required
MenubarService
typetype MenubarService = Service<MenubarInput, MenubarStateValue, MenubarContext, MenubarEvent, MenubarCommand>;MenubarSnapshot
typetype MenubarSnapshot = Snapshot<MenubarStateValue, MenubarContext>;MenubarStateValue
typetype MenubarStateValue = "ready";mountMenubar
functiondeclare function mountMenubar(container: HTMLElement, options: MountMenubarOptions): MenubarMount;containerHTMLElementoptionsMountMenubarOptionsreturnMenubarMount- Name
container- Kind
- parameter
- Type
HTMLElement- Requirement
- required
- Name
options- Kind
- parameter
- Type
MountMenubarOptions- Requirement
- required
- Name
return- Kind
- return value
- Type
MenubarMount- Requirement
- n/a
MountMenubarOptions
interfaceinterface MountMenubarOptions extends MenubarInput { readonly dir?: "ltr" | "rtl"; readonly onOpenChange?: (detail: MenubarOpenChangeDetail) => void; readonly onSelect?: (id: string, menuValue: string) => void; readonly scheduler?: Scheduler; readonly renderTrigger?: (element: HTMLElement, menu: MenubarMenu) => void; readonly renderItem?: (element: HTMLElement, item: MenubarActionable, menuValue: string) => void;}dir"ltr" | "rtl"onOpenChange(detail: MenubarOpenChangeDetail) => voidonSelect(id: string, menuValue: string) => voidrenderItem(element: HTMLElement, item: MenubarActionable, menuValue: string) => voidrenderTrigger(element: HTMLElement, menu: MenubarMenu) => voidschedulerScheduler- Name
dir- Kind
- property
- Type
"ltr" | "rtl"- Requirement
- optional
- Name
onOpenChange- Kind
- property
- Type
(detail: MenubarOpenChangeDetail) => void- Requirement
- optional
- Name
onSelect- Kind
- property
- Type
(id: string, menuValue: string) => void- Requirement
- optional
- Name
renderItem- Kind
- property
- Type
(element: HTMLElement, item: MenubarActionable, menuValue: string) => void- Requirement
- optional
- Name
renderTrigger- Kind
- property
- Type
(element: HTMLElement, menu: MenubarMenu) => void- Requirement
- optional
- Name
scheduler- Kind
- property
- Type
Scheduler- Requirement
- optional
resolveSubmenuPointerIntent
functionReturns `preserve` while the pointer travels through the corridor between a submenu trigger and its content. The corridor interpolates the two rectangles' top/bottom edges and includes a small eight-pixel tolerance so browser pointer sampling cannot close a submenu between adjacent samples.
declare function resolveSubmenuPointerIntent(input: SubmenuPointerIntentInput): SubmenuPointerIntent;inputSubmenuPointerIntentInputreturnSubmenuPointerIntent- Name
input- Kind
- parameter
- Type
SubmenuPointerIntentInput- Requirement
- required
- Name
return- Kind
- return value
- Type
SubmenuPointerIntent- Requirement
- n/a
runMenubarCommand
functiondeclare function runMenubarCommand(command: MenubarCommand, scope: PartScope, options?: { readonly onOpenChange?: (detail: MenubarOpenChangeDetail) => void; readonly onSelect?: (id: string, menuValue: string) => void;}): void;commandMenubarCommandscopePartScopeoptions{
readonly onOpenChange?: (detail: MenubarOpenChangeDetail) => void;
readonly onSelect?: (id: string, menuValue: string) => void;
}returnvoid- Name
command- Kind
- parameter
- Type
MenubarCommand- Requirement
- required
- Name
scope- Kind
- parameter
- Type
PartScope- Requirement
- required
- Name
options- Kind
- parameter
- Type
{ readonly onOpenChange?: (detail: MenubarOpenChangeDetail) => void; readonly onSelect?: (id: string, menuValue: string) => void; }- Requirement
- optional
- Name
return- Kind
- return value
- Type
void- Requirement
- n/a
SubmenuPointerIntentInput
interfaceinterface SubmenuPointerIntentInput { readonly previousPoint: SubmenuPoint | null; readonly currentPoint: SubmenuPoint; readonly triggerRect: SubmenuRect; readonly contentRect: SubmenuRect;}contentRectSubmenuRectcurrentPointSubmenuPointpreviousPointSubmenuPoint | nulltriggerRectSubmenuRect- Name
contentRect- Kind
- property
- Type
SubmenuRect- Requirement
- required
- Name
currentPoint- Kind
- property
- Type
SubmenuPoint- Requirement
- required
- Name
previousPoint- Kind
- property
- Type
SubmenuPoint | null- Requirement
- required
- Name
triggerRect- Kind
- property
- Type
SubmenuRect- Requirement
- required
Framework adapters
Each panel keeps its adapter's public vocabulary. React compound exports, Vue composables, standalone Angular declarations, Svelte components, and Solid hooks stay native to their framework.
React imports
import { Content, Item, Menubar, MenubarContextProvider, Root, Separator, SubContent, SubTrigger } from "@grassroot/ui-headless-react/menubar"; // +1 more exportsVue imports
<script setup lang="ts">import { MenubarContent, MenubarItem, MenubarRoot, MenubarSeparator, MenubarSubContent, MenubarSubTrigger, MenubarTrigger } from "@grassroot/ui-headless-vue/menubar";</script>Angular imports
import { Component } from "@angular/core";import { GR_MENUBAR_DECLARATIONS } from "@grassroot/ui-headless-angular/menubar"; @Component({ standalone: true, imports: [GR_MENUBAR_DECLARATIONS], template: `<!-- compose the menubar parts here -->` })export class Example {}Svelte imports
<script lang="ts"> import { MenubarContent, MenubarItem, MenubarRoot, MenubarSeparator, MenubarSubContent, MenubarSubTrigger, MenubarTrigger } from "@grassroot/ui-headless-svelte/menubar";</script>Solid imports
import { MenubarContent, MenubarContextProvider, MenubarItem, MenubarRoot, MenubarSeparator, MenubarSubContent, MenubarSubTrigger, MenubarTrigger } from "@grassroot/ui-headless-solid/menubar";@grassroot/ui-headless-react/menubar
React adapter
packages/ui-headless/react/src/menubar/index.ts
Content
valueexport declare const Content: import("react").ForwardRefExoticComponent<MenubarContentProps & import("react").RefAttributes<HTMLDivElement>>;propsPreturnReactNode- Name
props- Kind
- parameter
- Type
P- Requirement
- required
- Name
return- Kind
- return value
- Type
ReactNode- Requirement
- n/a
Item
valueexport declare const Item: import("react").ForwardRefExoticComponent<MenubarItemProps & import("react").RefAttributes<HTMLDivElement>>;propsPreturnReactNode- Name
props- Kind
- parameter
- Type
P- Requirement
- required
- Name
return- Kind
- return value
- Type
ReactNode- Requirement
- n/a
Menubar
valueexport declare const Menubar: { Root: import("react").ForwardRefExoticComponent<MenubarRootProps & import("react").RefAttributes<HTMLDivElement>>; Trigger: import("react").ForwardRefExoticComponent<MenubarTriggerProps & import("react").RefAttributes<HTMLButtonElement>>; Content: import("react").ForwardRefExoticComponent<MenubarContentProps & import("react").RefAttributes<HTMLDivElement>>; Item: import("react").ForwardRefExoticComponent<MenubarItemProps & import("react").RefAttributes<HTMLDivElement>>; Separator: import("react").ForwardRefExoticComponent<MenubarSeparatorProps & import("react").RefAttributes<HTMLDivElement>>; SubTrigger: import("react").ForwardRefExoticComponent<MenubarSubPartProps & import("react").RefAttributes<HTMLDivElement>>; SubContent: import("react").ForwardRefExoticComponent<MenubarSubPartProps & import("react").RefAttributes<HTMLDivElement>>;};Contentimport("react").ForwardRefExoticComponent<MenubarContentProps & import("react").RefAttributes<HTMLDivElement>>Itemimport("react").ForwardRefExoticComponent<MenubarItemProps & import("react").RefAttributes<HTMLDivElement>>Rootimport("react").ForwardRefExoticComponent<MenubarRootProps & import("react").RefAttributes<HTMLDivElement>>Separatorimport("react").ForwardRefExoticComponent<MenubarSeparatorProps & import("react").RefAttributes<HTMLDivElement>>SubContentimport("react").ForwardRefExoticComponent<MenubarSubPartProps & import("react").RefAttributes<HTMLDivElement>>SubTriggerimport("react").ForwardRefExoticComponent<MenubarSubPartProps & import("react").RefAttributes<HTMLDivElement>>Triggerimport("react").ForwardRefExoticComponent<MenubarTriggerProps & import("react").RefAttributes<HTMLButtonElement>>- Name
Content- Kind
- property
- Type
import("react").ForwardRefExoticComponent<MenubarContentProps & import("react").RefAttributes<HTMLDivElement>>- Requirement
- required
- Name
Item- Kind
- property
- Type
import("react").ForwardRefExoticComponent<MenubarItemProps & import("react").RefAttributes<HTMLDivElement>>- Requirement
- required
- Name
Root- Kind
- property
- Type
import("react").ForwardRefExoticComponent<MenubarRootProps & import("react").RefAttributes<HTMLDivElement>>- Requirement
- required
- Name
Separator- Kind
- property
- Type
import("react").ForwardRefExoticComponent<MenubarSeparatorProps & import("react").RefAttributes<HTMLDivElement>>- Requirement
- required
- Name
SubContent- Kind
- property
- Type
import("react").ForwardRefExoticComponent<MenubarSubPartProps & import("react").RefAttributes<HTMLDivElement>>- Requirement
- required
- Name
SubTrigger- Kind
- property
- Type
import("react").ForwardRefExoticComponent<MenubarSubPartProps & import("react").RefAttributes<HTMLDivElement>>- Requirement
- required
- Name
Trigger- Kind
- property
- Type
import("react").ForwardRefExoticComponent<MenubarTriggerProps & import("react").RefAttributes<HTMLButtonElement>>- Requirement
- required
MenubarContentProps
interfaceinterface MenubarContentProps extends ComponentPropsWithoutRef<"div"> { readonly asChild?: boolean; readonly value: string;}asChildbooleanvaluestring- Name
asChild- Kind
- property
- Type
boolean- Requirement
- optional
- Name
value- Kind
- property
- Type
string- Requirement
- required
MenubarContext
valueexport declare const MenubarContext: import("react").Context<MenubarContextValue | null>;propsPreturnReactNode- Name
props- Kind
- parameter
- Type
P- Requirement
- required
- Name
return- Kind
- return value
- Type
ReactNode- Requirement
- n/a
MenubarContextProvider
functiondeclare function MenubarContextProvider(props: { value: MenubarContextValue; children?: ReactNode;}): import("react").JSX.Element;props{
value: MenubarContextValue;
children?: ReactNode;
}returnimport("react").JSX.Element- Name
props- Kind
- parameter
- Type
{ value: MenubarContextValue; children?: ReactNode; }- Requirement
- required
- Name
return- Kind
- return value
- Type
import("react").JSX.Element- Requirement
- n/a
MenubarContextValue
interfaceinterface MenubarContextValue { readonly service: MenubarService; readonly connector: MenubarApi; readonly scope: PartScope; readonly snapshot: MenubarSnapshot;}connectorMenubarApiscopePartScopeserviceMenubarServicesnapshotMenubarSnapshot- Name
connector- Kind
- property
- Type
MenubarApi- Requirement
- required
- Name
scope- Kind
- property
- Type
PartScope- Requirement
- required
- Name
service- Kind
- property
- Type
MenubarService- Requirement
- required
- Name
snapshot- Kind
- property
- Type
MenubarSnapshot- Requirement
- required
MenubarItemProps
interfaceinterface MenubarItemProps extends ComponentPropsWithoutRef<"div"> { readonly asChild?: boolean; readonly menuValue: string; readonly item: MenubarActionable;}asChildbooleanitemMenubarActionablemenuValuestring- Name
asChild- Kind
- property
- Type
boolean- Requirement
- optional
- Name
item- Kind
- property
- Type
MenubarActionable- Requirement
- required
- Name
menuValue- Kind
- property
- Type
string- Requirement
- required
MenubarOpenChangeDetail
interfaceinterface MenubarOpenChangeDetail { readonly value: string | null; readonly reason: MenubarChangeReason;}reasonMenubarChangeReasonvaluestring | null- Name
reason- Kind
- property
- Type
MenubarChangeReason- Requirement
- required
- Name
value- Kind
- property
- Type
string | null- Requirement
- required
MenubarRootProps
interfaceinterface MenubarRootProps extends Omit<ComponentPropsWithoutRef<"div">, "value" | "defaultValue" | "dir" | "onSelect"> { readonly asChild?: boolean; readonly menus: MenubarInput["menus"]; readonly value?: MenubarInput["value"]; readonly defaultValue?: MenubarInput["defaultValue"]; readonly dir?: "ltr" | "rtl"; readonly onOpenChange?: (detail: MenubarOpenChangeDetail) => void; readonly onSelect?: UseMenubarOptions["onSelect"]; readonly scheduler?: UseMenubarOptions["scheduler"]; readonly children?: ReactNode;}asChildbooleanchildrenReactNodedefaultValueMenubarInput["defaultValue"]dir"ltr" | "rtl"menusMenubarInput["menus"]onOpenChange(detail: MenubarOpenChangeDetail) => voidonSelectUseMenubarOptions["onSelect"]schedulerUseMenubarOptions["scheduler"]valueMenubarInput["value"]- Name
asChild- Kind
- property
- Type
boolean- Requirement
- optional
- Name
children- Kind
- property
- Type
ReactNode- Requirement
- optional
- Name
defaultValue- Kind
- property
- Type
MenubarInput["defaultValue"]- Requirement
- optional
- Name
dir- Kind
- property
- Type
"ltr" | "rtl"- Requirement
- optional
- Name
menus- Kind
- property
- Type
MenubarInput["menus"]- Requirement
- required
- Name
onOpenChange- Kind
- property
- Type
(detail: MenubarOpenChangeDetail) => void- Requirement
- optional
- Name
onSelect- Kind
- property
- Type
UseMenubarOptions["onSelect"]- Requirement
- optional
- Name
scheduler- Kind
- property
- Type
UseMenubarOptions["scheduler"]- Requirement
- optional
- Name
value- Kind
- property
- Type
MenubarInput["value"]- Requirement
- optional
MenubarSeparatorProps
interfaceinterface MenubarSeparatorProps extends ComponentPropsWithoutRef<"div"> { readonly asChild?: boolean; readonly menuValue?: string;}asChildbooleanmenuValuestring- Name
asChild- Kind
- property
- Type
boolean- Requirement
- optional
- Name
menuValue- Kind
- property
- Type
string- Requirement
- optional
MenubarSubPartProps
interfaceinterface MenubarSubPartProps extends ComponentPropsWithoutRef<"div"> { readonly asChild?: boolean; readonly itemKey?: string;}asChildbooleanitemKeystring- Name
asChild- Kind
- property
- Type
boolean- Requirement
- optional
- Name
itemKey- Kind
- property
- Type
string- Requirement
- optional
MenubarTriggerProps
interfaceinterface MenubarTriggerProps extends ComponentPropsWithoutRef<"button"> { readonly asChild?: boolean; readonly menu: MenubarMenu;}asChildbooleanmenuMenubarMenu- Name
asChild- Kind
- property
- Type
boolean- Requirement
- optional
- Name
menu- Kind
- property
- Type
MenubarMenu- Requirement
- required
Root
valueexport declare const Root: import("react").ForwardRefExoticComponent<MenubarRootProps & import("react").RefAttributes<HTMLDivElement>>;propsPreturnReactNode- Name
props- Kind
- parameter
- Type
P- Requirement
- required
- Name
return- Kind
- return value
- Type
ReactNode- Requirement
- n/a
Separator
valueexport declare const Separator: import("react").ForwardRefExoticComponent<MenubarSeparatorProps & import("react").RefAttributes<HTMLDivElement>>;propsPreturnReactNode- Name
props- Kind
- parameter
- Type
P- Requirement
- required
- Name
return- Kind
- return value
- Type
ReactNode- Requirement
- n/a
SubContent
valueexport declare const SubContent: import("react").ForwardRefExoticComponent<MenubarSubPartProps & import("react").RefAttributes<HTMLDivElement>>;propsPreturnReactNode- Name
props- Kind
- parameter
- Type
P- Requirement
- required
- Name
return- Kind
- return value
- Type
ReactNode- Requirement
- n/a
SubTrigger
valueexport declare const SubTrigger: import("react").ForwardRefExoticComponent<MenubarSubPartProps & import("react").RefAttributes<HTMLDivElement>>;propsPreturnReactNode- Name
props- Kind
- parameter
- Type
P- Requirement
- required
- Name
return- Kind
- return value
- Type
ReactNode- Requirement
- n/a
Trigger
valueexport declare const Trigger: import("react").ForwardRefExoticComponent<MenubarTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;propsPreturnReactNode- Name
props- Kind
- parameter
- Type
P- Requirement
- required
- Name
return- Kind
- return value
- Type
ReactNode- Requirement
- n/a
useMenubar
functiondeclare function useMenubar(input: MenubarInput, options?: UseMenubarOptions): UseMenubarResult;inputMenubarInputoptionsUseMenubarOptionsreturnUseMenubarResult- Name
input- Kind
- parameter
- Type
MenubarInput- Requirement
- required
- Name
options- Kind
- parameter
- Type
UseMenubarOptions- Requirement
- optional
- Name
return- Kind
- return value
- Type
UseMenubarResult- Requirement
- n/a
useMenubarContext
functiondeclare function useMenubarContext(partName: string): MenubarContextValue;partNamestringreturnMenubarContextValue- Name
partName- Kind
- parameter
- Type
string- Requirement
- required
- Name
return- Kind
- return value
- Type
MenubarContextValue- Requirement
- n/a
UseMenubarOptions
interfaceinterface UseMenubarOptions { readonly dir?: "ltr" | "rtl"; readonly onOpenChange?: (detail: MenubarOpenChangeDetail$1) => void; readonly onSelect?: (id: string, menuValue: string) => void; readonly scheduler?: Scheduler;}dir"ltr" | "rtl"onOpenChange(detail: MenubarOpenChangeDetail$1) => voidonSelect(id: string, menuValue: string) => voidschedulerScheduler- Name
dir- Kind
- property
- Type
"ltr" | "rtl"- Requirement
- optional
- Name
onOpenChange- Kind
- property
- Type
(detail: MenubarOpenChangeDetail$1) => void- Requirement
- optional
- Name
onSelect- Kind
- property
- Type
(id: string, menuValue: string) => void- Requirement
- optional
- Name
scheduler- Kind
- property
- Type
Scheduler- Requirement
- optional
UseMenubarResult
interfaceinterface UseMenubarResult { readonly service: MenubarService; readonly connector: MenubarApi; readonly scope: PartScope; readonly snapshot: MenubarSnapshot;}connectorMenubarApiscopePartScopeserviceMenubarServicesnapshotMenubarSnapshot- Name
connector- Kind
- property
- Type
MenubarApi- Requirement
- required
- Name
scope- Kind
- property
- Type
PartScope- Requirement
- required
- Name
service- Kind
- property
- Type
MenubarService- Requirement
- required
- Name
snapshot- Kind
- property
- Type
MenubarSnapshot- Requirement
- required
@grassroot/ui-headless-vue/menubar
Vue adapter
packages/ui-headless/vue/src/menubar/index.ts
MenubarContent
valueexport declare const MenubarContent: import("vue").DefineComponent<import("vue").ExtractPropTypes<{ asChild: { type: BooleanConstructor; default: boolean; }; value: { type: StringConstructor; required: true; };}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, { [key: string]: any;}> | null, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{ asChild: { type: BooleanConstructor; default: boolean; }; value: { type: StringConstructor; required: true; };}>> & Readonly<{}>, { asChild: boolean;}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;MenubarContextKey
valueexport declare const MenubarContextKey: InjectionKey<MenubarContextValue>;MenubarContextValue
interfaceinterface MenubarContextValue { readonly service: MenubarService; readonly connector: MenubarApi; readonly scope: PartScope; readonly snapshot: ShallowRef<MenubarSnapshot>;}connectorMenubarApiscopePartScopeserviceMenubarServicesnapshotShallowRef<MenubarSnapshot>- Name
connector- Kind
- property
- Type
MenubarApi- Requirement
- required
- Name
scope- Kind
- property
- Type
PartScope- Requirement
- required
- Name
service- Kind
- property
- Type
MenubarService- Requirement
- required
- Name
snapshot- Kind
- property
- Type
ShallowRef<MenubarSnapshot>- Requirement
- required
MenubarItem
valueexport declare const MenubarItem: import("vue").DefineComponent<import("vue").ExtractPropTypes<{ asChild: { type: BooleanConstructor; default: boolean; }; menuValue: { type: StringConstructor; required: true; }; item: { type: PropType<MenubarActionable>; required: true; };}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, { [key: string]: any;}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{ asChild: { type: BooleanConstructor; default: boolean; }; menuValue: { type: StringConstructor; required: true; }; item: { type: PropType<MenubarActionable>; required: true; };}>> & Readonly<{}>, { asChild: boolean;}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;MenubarOpenChangeDetail
interfaceinterface MenubarOpenChangeDetail { readonly value: string | null; readonly reason: MenubarChangeReason;}reasonMenubarChangeReasonvaluestring | null- Name
reason- Kind
- property
- Type
MenubarChangeReason- Requirement
- required
- Name
value- Kind
- property
- Type
string | null- Requirement
- required
MenubarRoot
valueexport declare const MenubarRoot: import("vue").DefineComponent<import("vue").ExtractPropTypes<{ asChild: { type: BooleanConstructor; default: boolean; }; menus: { type: PropType<MenubarInput["menus"]>; required: true; }; value: { type: PropType<string | null | undefined>; default: undefined; }; defaultValue: { type: PropType<string | null | undefined>; default: undefined; }; dir: { type: PropType<"ltr" | "rtl" | undefined>; default: undefined; };}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, { [key: string]: any;}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, { openChange: (_detail: MenubarOpenChangeDetail) => true; select: (_id: string, _menuValue: string) => true;}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{ asChild: { type: BooleanConstructor; default: boolean; }; menus: { type: PropType<MenubarInput["menus"]>; required: true; }; value: { type: PropType<string | null | undefined>; default: undefined; }; defaultValue: { type: PropType<string | null | undefined>; default: undefined; }; dir: { type: PropType<"ltr" | "rtl" | undefined>; default: undefined; };}>> & Readonly<{ onOpenChange?: ((_detail: MenubarOpenChangeDetail) => any) | undefined; onSelect?: ((_id: string, _menuValue: string) => any) | undefined;}>, { asChild: boolean; value: string | null | undefined; defaultValue: string | null | undefined; dir: "ltr" | "rtl" | undefined;}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;MenubarSeparator
valueexport declare const MenubarSeparator: import("vue").DefineComponent<import("vue").ExtractPropTypes<{ asChild: { type: BooleanConstructor; default: boolean; }; menuValue: { type: StringConstructor; default: undefined; };}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, { [key: string]: any;}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{ asChild: { type: BooleanConstructor; default: boolean; }; menuValue: { type: StringConstructor; default: undefined; };}>> & Readonly<{}>, { asChild: boolean; menuValue: string;}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;MenubarSubContent
valueexport declare const MenubarSubContent: import("vue").DefineComponent<import("vue").ExtractPropTypes<{ asChild: { type: BooleanConstructor; default: boolean; }; itemKey: { type: StringConstructor; default: string; };}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, { [key: string]: any;}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{ asChild: { type: BooleanConstructor; default: boolean; }; itemKey: { type: StringConstructor; default: string; };}>> & Readonly<{}>, { asChild: boolean; itemKey: string;}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;MenubarSubTrigger
valueexport declare const MenubarSubTrigger: import("vue").DefineComponent<import("vue").ExtractPropTypes<{ asChild: { type: BooleanConstructor; default: boolean; }; itemKey: { type: StringConstructor; default: string; };}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, { [key: string]: any;}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{ asChild: { type: BooleanConstructor; default: boolean; }; itemKey: { type: StringConstructor; default: string; };}>> & Readonly<{}>, { asChild: boolean; itemKey: string;}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;MenubarTrigger
valueexport declare const MenubarTrigger: import("vue").DefineComponent<import("vue").ExtractPropTypes<{ asChild: { type: BooleanConstructor; default: boolean; }; menu: { type: PropType<MenubarMenu>; required: true; };}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, { [key: string]: any;}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{ asChild: { type: BooleanConstructor; default: boolean; }; menu: { type: PropType<MenubarMenu>; required: true; };}>> & Readonly<{}>, { asChild: boolean;}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;useMenubar
functiondeclare function useMenubar(input: MenubarInput | (() => MenubarInput), options?: UseMenubarOptions): UseMenubarResult;inputMenubarInput | (() => MenubarInput)optionsUseMenubarOptionsreturnUseMenubarResult- Name
input- Kind
- parameter
- Type
MenubarInput | (() => MenubarInput)- Requirement
- required
- Name
options- Kind
- parameter
- Type
UseMenubarOptions- Requirement
- optional
- Name
return- Kind
- return value
- Type
UseMenubarResult- Requirement
- n/a
useMenubarContext
functiondeclare function useMenubarContext(partName: string): MenubarContextValue;partNamestringreturnMenubarContextValue- Name
partName- Kind
- parameter
- Type
string- Requirement
- required
- Name
return- Kind
- return value
- Type
MenubarContextValue- Requirement
- n/a
UseMenubarOptions
interfaceinterface UseMenubarOptions { readonly dir?: "ltr" | "rtl"; readonly onOpenChange?: (detail: MenubarOpenChangeDetail$1) => void; readonly onSelect?: (id: string, menuValue: string) => void; readonly scheduler?: Scheduler;}dir"ltr" | "rtl"onOpenChange(detail: MenubarOpenChangeDetail$1) => voidonSelect(id: string, menuValue: string) => voidschedulerScheduler- Name
dir- Kind
- property
- Type
"ltr" | "rtl"- Requirement
- optional
- Name
onOpenChange- Kind
- property
- Type
(detail: MenubarOpenChangeDetail$1) => void- Requirement
- optional
- Name
onSelect- Kind
- property
- Type
(id: string, menuValue: string) => void- Requirement
- optional
- Name
scheduler- Kind
- property
- Type
Scheduler- Requirement
- optional
UseMenubarResult
interfaceinterface UseMenubarResult { readonly service: MenubarService; readonly connector: MenubarApi; readonly scope: PartScope; readonly snapshot: ShallowRef<MenubarSnapshot>;}connectorMenubarApiscopePartScopeserviceMenubarServicesnapshotShallowRef<MenubarSnapshot>- Name
connector- Kind
- property
- Type
MenubarApi- Requirement
- required
- Name
scope- Kind
- property
- Type
PartScope- Requirement
- required
- Name
service- Kind
- property
- Type
MenubarService- Requirement
- required
- Name
snapshot- Kind
- property
- Type
ShallowRef<MenubarSnapshot>- Requirement
- required
@grassroot/ui-headless-angular/menubar
Angular adapter
packages/ui-headless/angular/src/menubar/index.ts
createMenubarStore
functionexport declare function createMenubarStore(initialInput: MenubarInput, options?: CreateMenubarStoreOptions): MenubarStore;initialInputMenubarInputoptionsCreateMenubarStoreOptionsreturnMenubarStore- Name
initialInput- Kind
- parameter
- Type
MenubarInput- Requirement
- required
- Name
options- Kind
- parameter
- Type
CreateMenubarStoreOptions- Requirement
- optional
- Name
return- Kind
- return value
- Type
MenubarStore- Requirement
- n/a
CreateMenubarStoreOptions
interfaceexport interface CreateMenubarStoreOptions { readonly dir?: "ltr" | "rtl"; readonly onOpenChange?: (detail: MenubarOpenChangeDetail) => void; readonly onSelect?: (id: string, menuValue: string) => void; readonly onCommit?: () => void; readonly scheduler?: Scheduler;}dir"ltr" | "rtl"onCommit() => voidonOpenChange(detail: MenubarOpenChangeDetail) => voidonSelect(id: string, menuValue: string) => voidschedulerScheduler- Name
dir- Kind
- property
- Type
"ltr" | "rtl"- Requirement
- optional
- Name
onCommit- Kind
- property
- Type
() => void- Requirement
- optional
- Name
onOpenChange- Kind
- property
- Type
(detail: MenubarOpenChangeDetail) => void- Requirement
- optional
- Name
onSelect- Kind
- property
- Type
(id: string, menuValue: string) => void- Requirement
- optional
- Name
scheduler- Kind
- property
- Type
Scheduler- Requirement
- optional
GR_MENUBAR_DECLARATIONS
valueexport declare const GR_MENUBAR_DECLARATIONS: readonly [typeof GrMenubarRoot, typeof GrMenubarTrigger, typeof GrMenubarOpen, typeof GrMenubarContent, typeof GrMenubarItem, typeof GrMenubarSeparator, typeof GrMenubarSubTrigger, typeof GrMenubarSubContent];GrMenubarContent
classexport declare class GrMenubarContent implements OnDestroy { readonly value: import("@angular/core").InputSignal<string>; private readonly store; private readonly element; private readonly listeners; private readonly consumer; private key; constructor(); ngOnDestroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration<GrMenubarContent, never>; static ɵdir: i0.ɵɵDirectiveDeclaration<GrMenubarContent, "[grMenubarContent]", never, { "value": { "alias": "value"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;}consumeranyelementanykeyanylistenersanyngOnDestroy() => voidɵdiri0.ɵɵDirectiveDeclaration<GrMenubarContent, "[grMenubarContent]", never, { "value": { "alias": "value"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>ɵfaci0.ɵɵFactoryDeclaration<GrMenubarContent, never>storeanyvalueimport("@angular/core").InputSignal<string>- Name
consumer- Kind
- property
- Type
any- Requirement
- required
- Name
element- Kind
- property
- Type
any- Requirement
- required
- Name
key- Kind
- property
- Type
any- Requirement
- required
- Name
listeners- Kind
- property
- Type
any- Requirement
- required
- Name
ngOnDestroy- Kind
- method
- Type
() => void- Requirement
- required
- Name
ɵdir- Kind
- property
- Type
i0.ɵɵDirectiveDeclaration<GrMenubarContent, "[grMenubarContent]", never, { "value": { "alias": "value"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>- Requirement
- required
- Name
ɵfac- Kind
- property
- Type
i0.ɵɵFactoryDeclaration<GrMenubarContent, never>- Requirement
- required
- Name
store- Kind
- property
- Type
any- Requirement
- required
- Name
value- Kind
- property
- Type
import("@angular/core").InputSignal<string>- Requirement
- required
GrMenubarItem
classexport declare class GrMenubarItem implements OnDestroy { readonly menuValue: import("@angular/core").InputSignal<string>; readonly item: import("@angular/core").InputSignal<MenubarActionable>; private readonly store; private readonly element; private readonly listeners; private readonly consumer; private key; constructor(); ngOnDestroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration<GrMenubarItem, never>; static ɵdir: i0.ɵɵDirectiveDeclaration<GrMenubarItem, "[grMenubarItem]", never, { "menuValue": { "alias": "menuValue"; "required": true; "isSignal": true; }; "item": { "alias": "item"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;}consumeranyelementanyitemimport("@angular/core").InputSignal<MenubarActionable>keyanylistenersanymenuValueimport("@angular/core").InputSignal<string>ngOnDestroy() => voidɵdiri0.ɵɵDirectiveDeclaration<GrMenubarItem, "[grMenubarItem]", never, { "menuValue": { "alias": "menuValue"; "required": true; "isSignal": true; }; "item": { "alias": "item"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>ɵfaci0.ɵɵFactoryDeclaration<GrMenubarItem, never>storeany- Name
consumer- Kind
- property
- Type
any- Requirement
- required
- Name
element- Kind
- property
- Type
any- Requirement
- required
- Name
item- Kind
- property
- Type
import("@angular/core").InputSignal<MenubarActionable>- Requirement
- required
- Name
key- Kind
- property
- Type
any- Requirement
- required
- Name
listeners- Kind
- property
- Type
any- Requirement
- required
- Name
menuValue- Kind
- property
- Type
import("@angular/core").InputSignal<string>- Requirement
- required
- Name
ngOnDestroy- Kind
- method
- Type
() => void- Requirement
- required
- Name
ɵdir- Kind
- property
- Type
i0.ɵɵDirectiveDeclaration<GrMenubarItem, "[grMenubarItem]", never, { "menuValue": { "alias": "menuValue"; "required": true; "isSignal": true; }; "item": { "alias": "item"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>- Requirement
- required
- Name
ɵfac- Kind
- property
- Type
i0.ɵɵFactoryDeclaration<GrMenubarItem, never>- Requirement
- required
- Name
store- Kind
- property
- Type
any- Requirement
- required
GrMenubarOpen
classexport declare class GrMenubarOpen implements OnDestroy { private readonly store; private readonly template; private readonly view; private hasView; constructor(); ngOnDestroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration<GrMenubarOpen, never>; static ɵdir: i0.ɵɵDirectiveDeclaration<GrMenubarOpen, "[grMenubarOpen]", never, {}, {}, never, never, true, never>;}hasViewanyngOnDestroy() => voidɵdiri0.ɵɵDirectiveDeclaration<GrMenubarOpen, "[grMenubarOpen]", never, {}, {}, never, never, true, never>ɵfaci0.ɵɵFactoryDeclaration<GrMenubarOpen, never>storeanytemplateanyviewany- Name
hasView- Kind
- property
- Type
any- Requirement
- required
- Name
ngOnDestroy- Kind
- method
- Type
() => void- Requirement
- required
- Name
ɵdir- Kind
- property
- Type
i0.ɵɵDirectiveDeclaration<GrMenubarOpen, "[grMenubarOpen]", never, {}, {}, never, never, true, never>- Requirement
- required
- Name
ɵfac- Kind
- property
- Type
i0.ɵɵFactoryDeclaration<GrMenubarOpen, never>- Requirement
- required
- Name
store- Kind
- property
- Type
any- Requirement
- required
- Name
template- Kind
- property
- Type
any- Requirement
- required
- Name
view- Kind
- property
- Type
any- Requirement
- required
GrMenubarRoot
classexport declare class GrMenubarRoot implements OnDestroy { readonly menus: import("@angular/core").InputSignal<readonly import("@grassroot/ui-machines/menubar").MenubarMenu[]>; readonly value: import("@angular/core").InputSignal<string | null | undefined>; readonly defaultValue: import("@angular/core").InputSignal<string | null | undefined>; readonly dir: import("@angular/core").InputSignal<"rtl" | "ltr" | undefined>; readonly openChange: import("@angular/core").OutputEmitterRef<MenubarOpenChangeDetail>; readonly select: import("@angular/core").OutputEmitterRef<{ id: string; menuValue: string; }>; readonly store: MenubarStore; private lastInput; private release; private wasOpen; private readonly element; private readonly listeners; private readonly consumer; constructor(); ngOnDestroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration<GrMenubarRoot, never>; static ɵdir: i0.ɵɵDirectiveDeclaration<GrMenubarRoot, "[grMenubarRoot]", never, { "menus": { "alias": "menus"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "defaultValue": { "alias": "defaultValue"; "required": false; "isSignal": true; }; "dir": { "alias": "dir"; "required": false; "isSignal": true; }; }, { "openChange": "openChange"; "select": "select"; }, never, never, true, never>;}consumeranydefaultValueimport("@angular/core").InputSignal<string | null | undefined>dirimport("@angular/core").InputSignal<"rtl" | "ltr" | undefined>elementanylastInputanylistenersanymenusimport("@angular/core").InputSignal<readonly import("@grassroot/ui-machines/menubar").MenubarMenu[]>ngOnDestroy() => voidopenChangeimport("@angular/core").OutputEmitterRef<MenubarOpenChangeDetail>ɵdiri0.ɵɵDirectiveDeclaration<GrMenubarRoot, "[grMenubarRoot]", never, { "menus": { "alias": "menus"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "defaultValue": { "alias": "defaultValue"; "required": false; "isSignal": true; }; "dir": { "alias": "dir"; "required": false; "isSignal": true; }; }, { "openChange": "openChange"; "select": "select"; }, never, never, true, never>ɵfaci0.ɵɵFactoryDeclaration<GrMenubarRoot, never>releaseanyselectimport("@angular/core").OutputEmitterRef<{
id: string;
menuValue: string;
}>storeMenubarStore- Name
consumer- Kind
- property
- Type
any- Requirement
- required
- Name
defaultValue- Kind
- property
- Type
import("@angular/core").InputSignal<string | null | undefined>- Requirement
- required
- Name
dir- Kind
- property
- Type
import("@angular/core").InputSignal<"rtl" | "ltr" | undefined>- Requirement
- required
- Name
element- Kind
- property
- Type
any- Requirement
- required
- Name
lastInput- Kind
- property
- Type
any- Requirement
- required
- Name
listeners- Kind
- property
- Type
any- Requirement
- required
- Name
menus- Kind
- property
- Type
import("@angular/core").InputSignal<readonly import("@grassroot/ui-machines/menubar").MenubarMenu[]>- Requirement
- required
- Name
ngOnDestroy- Kind
- method
- Type
() => void- Requirement
- required
- Name
openChange- Kind
- property
- Type
import("@angular/core").OutputEmitterRef<MenubarOpenChangeDetail>- Requirement
- required
- Name
ɵdir- Kind
- property
- Type
i0.ɵɵDirectiveDeclaration<GrMenubarRoot, "[grMenubarRoot]", never, { "menus": { "alias": "menus"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "defaultValue": { "alias": "defaultValue"; "required": false; "isSignal": true; }; "dir": { "alias": "dir"; "required": false; "isSignal": true; }; }, { "openChange": "openChange"; "select": "select"; }, never, never, true, never>- Requirement
- required
- Name
ɵfac- Kind
- property
- Type
i0.ɵɵFactoryDeclaration<GrMenubarRoot, never>- Requirement
- required
- Name
release- Kind
- property
- Type
any- Requirement
- required
- Name
select- Kind
- property
- Type
import("@angular/core").OutputEmitterRef<{ id: string; menuValue: string; }>- Requirement
- required
- Name
store- Kind
- property
- Type
MenubarStore- Requirement
- required
- Name
value- Kind
- property
- Type
import("@angular/core").InputSignal<string | null | undefined>- Requirement
- required
- Name
wasOpen- Kind
- property
- Type
any- Requirement
- required
GrMenubarSeparator
classexport declare class GrMenubarSeparator implements OnDestroy { private readonly store; private readonly element; private readonly listeners; private readonly consumer; constructor(); ngOnDestroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration<GrMenubarSeparator, never>; static ɵdir: i0.ɵɵDirectiveDeclaration<GrMenubarSeparator, "[grMenubarSeparator]", never, {}, {}, never, never, true, never>;}consumeranyelementanylistenersanyngOnDestroy() => voidɵdiri0.ɵɵDirectiveDeclaration<GrMenubarSeparator, "[grMenubarSeparator]", never, {}, {}, never, never, true, never>ɵfaci0.ɵɵFactoryDeclaration<GrMenubarSeparator, never>storeany- Name
consumer- Kind
- property
- Type
any- Requirement
- required
- Name
element- Kind
- property
- Type
any- Requirement
- required
- Name
listeners- Kind
- property
- Type
any- Requirement
- required
- Name
ngOnDestroy- Kind
- method
- Type
() => void- Requirement
- required
- Name
ɵdir- Kind
- property
- Type
i0.ɵɵDirectiveDeclaration<GrMenubarSeparator, "[grMenubarSeparator]", never, {}, {}, never, never, true, never>- Requirement
- required
- Name
ɵfac- Kind
- property
- Type
i0.ɵɵFactoryDeclaration<GrMenubarSeparator, never>- Requirement
- required
- Name
store- Kind
- property
- Type
any- Requirement
- required
GrMenubarSubContent
classexport declare class GrMenubarSubContent implements OnDestroy { readonly itemKey: import("@angular/core").InputSignal<string>; private readonly store; private readonly element; private readonly listeners; private readonly consumer; private registeredKey; private registeredRef; constructor(); ngOnDestroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration<GrMenubarSubContent, never>; static ɵdir: i0.ɵɵDirectiveDeclaration<GrMenubarSubContent, "[grMenubarSubContent]", never, { "itemKey": { "alias": "itemKey"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;}consumeranyelementanyitemKeyimport("@angular/core").InputSignal<string>listenersanyngOnDestroy() => voidɵdiri0.ɵɵDirectiveDeclaration<GrMenubarSubContent, "[grMenubarSubContent]", never, { "itemKey": { "alias": "itemKey"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>ɵfaci0.ɵɵFactoryDeclaration<GrMenubarSubContent, never>registeredKeyanyregisteredRefanystoreany- Name
consumer- Kind
- property
- Type
any- Requirement
- required
- Name
element- Kind
- property
- Type
any- Requirement
- required
- Name
itemKey- Kind
- property
- Type
import("@angular/core").InputSignal<string>- Requirement
- required
- Name
listeners- Kind
- property
- Type
any- Requirement
- required
- Name
ngOnDestroy- Kind
- method
- Type
() => void- Requirement
- required
- Name
ɵdir- Kind
- property
- Type
i0.ɵɵDirectiveDeclaration<GrMenubarSubContent, "[grMenubarSubContent]", never, { "itemKey": { "alias": "itemKey"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>- Requirement
- required
- Name
ɵfac- Kind
- property
- Type
i0.ɵɵFactoryDeclaration<GrMenubarSubContent, never>- Requirement
- required
- Name
registeredKey- Kind
- property
- Type
any- Requirement
- required
- Name
registeredRef- Kind
- property
- Type
any- Requirement
- required
- Name
store- Kind
- property
- Type
any- Requirement
- required
GrMenubarSubTrigger
classexport declare class GrMenubarSubTrigger implements OnDestroy { readonly itemKey: import("@angular/core").InputSignal<string>; private readonly store; private readonly element; private readonly listeners; private readonly consumer; private registeredKey; private registeredRef; constructor(); ngOnDestroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration<GrMenubarSubTrigger, never>; static ɵdir: i0.ɵɵDirectiveDeclaration<GrMenubarSubTrigger, "[grMenubarSubTrigger]", never, { "itemKey": { "alias": "itemKey"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;}consumeranyelementanyitemKeyimport("@angular/core").InputSignal<string>listenersanyngOnDestroy() => voidɵdiri0.ɵɵDirectiveDeclaration<GrMenubarSubTrigger, "[grMenubarSubTrigger]", never, { "itemKey": { "alias": "itemKey"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>ɵfaci0.ɵɵFactoryDeclaration<GrMenubarSubTrigger, never>registeredKeyanyregisteredRefanystoreany- Name
consumer- Kind
- property
- Type
any- Requirement
- required
- Name
element- Kind
- property
- Type
any- Requirement
- required
- Name
itemKey- Kind
- property
- Type
import("@angular/core").InputSignal<string>- Requirement
- required
- Name
listeners- Kind
- property
- Type
any- Requirement
- required
- Name
ngOnDestroy- Kind
- method
- Type
() => void- Requirement
- required
- Name
ɵdir- Kind
- property
- Type
i0.ɵɵDirectiveDeclaration<GrMenubarSubTrigger, "[grMenubarSubTrigger]", never, { "itemKey": { "alias": "itemKey"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>- Requirement
- required
- Name
ɵfac- Kind
- property
- Type
i0.ɵɵFactoryDeclaration<GrMenubarSubTrigger, never>- Requirement
- required
- Name
registeredKey- Kind
- property
- Type
any- Requirement
- required
- Name
registeredRef- Kind
- property
- Type
any- Requirement
- required
- Name
store- Kind
- property
- Type
any- Requirement
- required
GrMenubarTrigger
classexport declare class GrMenubarTrigger implements OnDestroy { readonly menu: import("@angular/core").InputSignal<MenubarMenu>; private readonly store; private readonly element; private readonly listeners; private readonly consumer; private key; private pointerDown; private pointerTimer; private resetPointerTimer; constructor(); ngOnDestroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration<GrMenubarTrigger, never>; static ɵdir: i0.ɵɵDirectiveDeclaration<GrMenubarTrigger, "[grMenubarTrigger]", never, { "menu": { "alias": "menu"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;}consumeranyelementanykeyanylistenersanymenuimport("@angular/core").InputSignal<MenubarMenu>ngOnDestroy() => voidɵdiri0.ɵɵDirectiveDeclaration<GrMenubarTrigger, "[grMenubarTrigger]", never, { "menu": { "alias": "menu"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>ɵfaci0.ɵɵFactoryDeclaration<GrMenubarTrigger, never>pointerDownanypointerTimeranyresetPointerTimeranystoreany- Name
consumer- Kind
- property
- Type
any- Requirement
- required
- Name
element- Kind
- property
- Type
any- Requirement
- required
- Name
key- Kind
- property
- Type
any- Requirement
- required
- Name
listeners- Kind
- property
- Type
any- Requirement
- required
- Name
menu- Kind
- property
- Type
import("@angular/core").InputSignal<MenubarMenu>- Requirement
- required
- Name
ngOnDestroy- Kind
- method
- Type
() => void- Requirement
- required
- Name
ɵdir- Kind
- property
- Type
i0.ɵɵDirectiveDeclaration<GrMenubarTrigger, "[grMenubarTrigger]", never, { "menu": { "alias": "menu"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>- Requirement
- required
- Name
ɵfac- Kind
- property
- Type
i0.ɵɵFactoryDeclaration<GrMenubarTrigger, never>- Requirement
- required
- Name
pointerDown- Kind
- property
- Type
any- Requirement
- required
- Name
pointerTimer- Kind
- property
- Type
any- Requirement
- required
- Name
resetPointerTimer- Kind
- property
- Type
any- Requirement
- required
- Name
store- Kind
- property
- Type
any- Requirement
- required
MENUBAR_STORE
valueexport declare const MENUBAR_STORE: InjectionToken<MenubarStore>;MenubarStore
interfaceexport interface MenubarStore { readonly service: MenubarService; readonly connector: MenubarApi; readonly scope: PartScope; readonly version: WritableSignal<number>; start(): void; stop(): void; sync(input: import("@grassroot/ui-machines/menubar").MenubarInput): void; setDir(dir: "ltr" | "rtl" | undefined): void;}connectorMenubarApiscopePartScopeserviceMenubarServicesetDir(dir: "ltr" | "rtl" | undefined) => voidstart() => voidstop() => voidsync(input: import("@grassroot/ui-machines/menubar").MenubarInput) => voidversionWritableSignal<number>- Name
connector- Kind
- property
- Type
MenubarApi- Requirement
- required
- Name
scope- Kind
- property
- Type
PartScope- Requirement
- required
- Name
service- Kind
- property
- Type
MenubarService- Requirement
- required
- Name
setDir- Kind
- method
- Type
(dir: "ltr" | "rtl" | undefined) => void- Requirement
- required
- Name
start- Kind
- method
- Type
() => void- Requirement
- required
- Name
stop- Kind
- method
- Type
() => void- Requirement
- required
- Name
sync- Kind
- method
- Type
(input: import("@grassroot/ui-machines/menubar").MenubarInput) => void- Requirement
- required
- Name
version- Kind
- property
- Type
WritableSignal<number>- Requirement
- required
@grassroot/ui-headless-svelte/menubar
Svelte adapter
packages/ui-headless/svelte/src/menubar/index.ts
createMenubar
functionexport declare function createMenubar(inputGetter: () => MenubarInput, options?: UseMenubarOptions): UseMenubarResult;inputGetter() => MenubarInputoptionsUseMenubarOptionsreturnUseMenubarResult- Name
inputGetter- Kind
- parameter
- Type
() => MenubarInput- Requirement
- required
- Name
options- Kind
- parameter
- Type
UseMenubarOptions- Requirement
- optional
- Name
return- Kind
- return value
- Type
UseMenubarResult- Requirement
- n/a
MenubarContent
valueexport declare const MenubarContent: LegacyComponentType;argsParameters<Component<Record<string, any>>>returnReturnType<Component<Record<string, any>, Record<string, any>>>- Name
args- Kind
- parameter
- Type
Parameters<Component<Record<string, any>>>- Requirement
- optional
- Name
return- Kind
- return value
- Type
ReturnType<Component<Record<string, any>, Record<string, any>>>- Requirement
- n/a
MenubarContextValue
interfaceexport interface MenubarContextValue { readonly service: MenubarService; readonly connector: MenubarApi; readonly scope: PartScope; readonly version: () => number;}connectorMenubarApiscopePartScopeserviceMenubarServiceversion() => number- Name
connector- Kind
- property
- Type
MenubarApi- Requirement
- required
- Name
scope- Kind
- property
- Type
PartScope- Requirement
- required
- Name
service- Kind
- property
- Type
MenubarService- Requirement
- required
- Name
version- Kind
- property
- Type
() => number- Requirement
- required
MenubarItem
valueexport declare const MenubarItem: LegacyComponentType;argsParameters<Component<Record<string, any>>>returnReturnType<Component<Record<string, any>, Record<string, any>>>- Name
args- Kind
- parameter
- Type
Parameters<Component<Record<string, any>>>- Requirement
- optional
- Name
return- Kind
- return value
- Type
ReturnType<Component<Record<string, any>, Record<string, any>>>- Requirement
- n/a
MenubarOpenChangeDetail
interfaceinterface MenubarOpenChangeDetail { readonly value: string | null; readonly reason: MenubarChangeReason;}reasonMenubarChangeReasonvaluestring | null- Name
reason- Kind
- property
- Type
MenubarChangeReason- Requirement
- required
- Name
value- Kind
- property
- Type
string | null- Requirement
- required
MenubarRoot
valueexport declare const MenubarRoot: LegacyComponentType;argsParameters<Component<Record<string, any>>>returnReturnType<Component<Record<string, any>, Record<string, any>>>- Name
args- Kind
- parameter
- Type
Parameters<Component<Record<string, any>>>- Requirement
- optional
- Name
return- Kind
- return value
- Type
ReturnType<Component<Record<string, any>, Record<string, any>>>- Requirement
- n/a
MenubarSeparator
valueexport declare const MenubarSeparator: LegacyComponentType;argsParameters<Component<Record<string, any>>>returnReturnType<Component<Record<string, any>, Record<string, any>>>- Name
args- Kind
- parameter
- Type
Parameters<Component<Record<string, any>>>- Requirement
- optional
- Name
return- Kind
- return value
- Type
ReturnType<Component<Record<string, any>, Record<string, any>>>- Requirement
- n/a
MenubarSubContent
valueexport declare const MenubarSubContent: LegacyComponentType;argsParameters<Component<Record<string, any>>>returnReturnType<Component<Record<string, any>, Record<string, any>>>- Name
args- Kind
- parameter
- Type
Parameters<Component<Record<string, any>>>- Requirement
- optional
- Name
return- Kind
- return value
- Type
ReturnType<Component<Record<string, any>, Record<string, any>>>- Requirement
- n/a
MenubarSubTrigger
valueexport declare const MenubarSubTrigger: LegacyComponentType;argsParameters<Component<Record<string, any>>>returnReturnType<Component<Record<string, any>, Record<string, any>>>- Name
args- Kind
- parameter
- Type
Parameters<Component<Record<string, any>>>- Requirement
- optional
- Name
return- Kind
- return value
- Type
ReturnType<Component<Record<string, any>, Record<string, any>>>- Requirement
- n/a
MenubarTrigger
valueexport declare const MenubarTrigger: LegacyComponentType;argsParameters<Component<Record<string, any>>>returnReturnType<Component<Record<string, any>, Record<string, any>>>- Name
args- Kind
- parameter
- Type
Parameters<Component<Record<string, any>>>- Requirement
- optional
- Name
return- Kind
- return value
- Type
ReturnType<Component<Record<string, any>, Record<string, any>>>- Requirement
- n/a
provideMenubarContext
functionexport declare function provideMenubarContext(value: MenubarContextValue): void;valueMenubarContextValuereturnvoid- Name
value- Kind
- parameter
- Type
MenubarContextValue- Requirement
- required
- Name
return- Kind
- return value
- Type
void- Requirement
- n/a
useMenubarContext
functionexport declare function useMenubarContext(partName: string): MenubarContextValue;partNamestringreturnMenubarContextValue- Name
partName- Kind
- parameter
- Type
string- Requirement
- required
- Name
return- Kind
- return value
- Type
MenubarContextValue- Requirement
- n/a
UseMenubarOptions
interfaceexport interface UseMenubarOptions { readonly dir?: "ltr" | "rtl"; readonly onOpenChange?: (detail: MenubarOpenChangeDetail) => void; readonly onSelect?: (id: string, menuValue: string) => void; readonly scheduler?: Scheduler;}dir"ltr" | "rtl"onOpenChange(detail: MenubarOpenChangeDetail) => voidonSelect(id: string, menuValue: string) => voidschedulerScheduler- Name
dir- Kind
- property
- Type
"ltr" | "rtl"- Requirement
- optional
- Name
onOpenChange- Kind
- property
- Type
(detail: MenubarOpenChangeDetail) => void- Requirement
- optional
- Name
onSelect- Kind
- property
- Type
(id: string, menuValue: string) => void- Requirement
- optional
- Name
scheduler- Kind
- property
- Type
Scheduler- Requirement
- optional
UseMenubarResult
interfaceexport interface UseMenubarResult { readonly service: MenubarService; readonly connector: MenubarApi; readonly scope: PartScope; readonly version: () => number;}connectorMenubarApiscopePartScopeserviceMenubarServiceversion() => number- Name
connector- Kind
- property
- Type
MenubarApi- Requirement
- required
- Name
scope- Kind
- property
- Type
PartScope- Requirement
- required
- Name
service- Kind
- property
- Type
MenubarService- Requirement
- required
- Name
version- Kind
- property
- Type
() => number- Requirement
- required
@grassroot/ui-headless-solid/menubar
Solid adapter
packages/ui-headless/solid/src/menubar/index.ts
MenubarContent
functionexport declare function MenubarContent(props: MenubarContentProps): JSX.Element;propsMenubarContentPropsreturnJSX.Element- Name
props- Kind
- parameter
- Type
MenubarContentProps- Requirement
- required
- Name
return- Kind
- return value
- Type
JSX.Element- Requirement
- n/a
MenubarContentProps
interfaceexport interface MenubarContentProps extends JSX.HTMLAttributes<HTMLDivElement> { readonly as?: AsProp; readonly value: string;}asAsPropvaluestring- Name
as- Kind
- property
- Type
AsProp- Requirement
- optional
- Name
value- Kind
- property
- Type
string- Requirement
- required
MenubarContext
valueexport declare const MenubarContext: import("solid-js").Context<MenubarContextValue | undefined>;MenubarContextProvider
functionexport declare function MenubarContextProvider(props: { value: MenubarContextValue; children: JSX.Element;}): JSX.Element;props{
value: MenubarContextValue;
children: JSX.Element;
}returnJSX.Element- Name
props- Kind
- parameter
- Type
{ value: MenubarContextValue; children: JSX.Element; }- Requirement
- required
- Name
return- Kind
- return value
- Type
JSX.Element- Requirement
- n/a
MenubarContextValue
interfaceexport interface MenubarContextValue { readonly service: MenubarService; readonly connector: MenubarApi; readonly scope: PartScope; readonly snapshot: Accessor<MenubarSnapshot>;}connectorMenubarApiscopePartScopeserviceMenubarServicesnapshotAccessor<MenubarSnapshot>- Name
connector- Kind
- property
- Type
MenubarApi- Requirement
- required
- Name
scope- Kind
- property
- Type
PartScope- Requirement
- required
- Name
service- Kind
- property
- Type
MenubarService- Requirement
- required
- Name
snapshot- Kind
- property
- Type
Accessor<MenubarSnapshot>- Requirement
- required
MenubarItem
functionexport declare function MenubarItem(props: MenubarItemProps): JSX.Element;propsMenubarItemPropsreturnJSX.Element- Name
props- Kind
- parameter
- Type
MenubarItemProps- Requirement
- required
- Name
return- Kind
- return value
- Type
JSX.Element- Requirement
- n/a
MenubarItemProps
interfaceexport interface MenubarItemProps extends JSX.HTMLAttributes<HTMLDivElement> { readonly as?: AsProp; readonly menuValue: string; readonly item: MenubarActionable;}asAsPropitemMenubarActionablemenuValuestring- Name
as- Kind
- property
- Type
AsProp- Requirement
- optional
- Name
item- Kind
- property
- Type
MenubarActionable- Requirement
- required
- Name
menuValue- Kind
- property
- Type
string- Requirement
- required
MenubarOpenChangeDetail
interfaceinterface MenubarOpenChangeDetail { readonly value: string | null; readonly reason: MenubarChangeReason;}reasonMenubarChangeReasonvaluestring | null- Name
reason- Kind
- property
- Type
MenubarChangeReason- Requirement
- required
- Name
value- Kind
- property
- Type
string | null- Requirement
- required
MenubarRoot
functionexport declare function MenubarRoot(props: MenubarRootProps): JSX.Element;propsMenubarRootPropsreturnJSX.Element- Name
props- Kind
- parameter
- Type
MenubarRootProps- Requirement
- required
- Name
return- Kind
- return value
- Type
JSX.Element- Requirement
- n/a
MenubarRootProps
interfaceexport interface MenubarRootProps extends Omit<JSX.HTMLAttributes<HTMLDivElement>, "onSelect"> { readonly as?: AsProp; readonly menus: MenubarInput["menus"]; readonly value?: MenubarInput["value"]; readonly defaultValue?: MenubarInput["defaultValue"]; readonly dir?: "ltr" | "rtl"; readonly onOpenChange?: (detail: MenubarOpenChangeDetail) => void; readonly onSelect?: (id: string, menuValue: string) => void;}asAsPropdefaultValueMenubarInput["defaultValue"]dir"ltr" | "rtl"menusMenubarInput["menus"]onOpenChange(detail: MenubarOpenChangeDetail) => voidonSelect(id: string, menuValue: string) => voidvalueMenubarInput["value"]- Name
as- Kind
- property
- Type
AsProp- Requirement
- optional
- Name
defaultValue- Kind
- property
- Type
MenubarInput["defaultValue"]- Requirement
- optional
- Name
dir- Kind
- property
- Type
"ltr" | "rtl"- Requirement
- optional
- Name
menus- Kind
- property
- Type
MenubarInput["menus"]- Requirement
- required
- Name
onOpenChange- Kind
- property
- Type
(detail: MenubarOpenChangeDetail) => void- Requirement
- optional
- Name
onSelect- Kind
- property
- Type
(id: string, menuValue: string) => void- Requirement
- optional
- Name
value- Kind
- property
- Type
MenubarInput["value"]- Requirement
- optional
MenubarSeparator
functionexport declare function MenubarSeparator(props: MenubarSeparatorProps): JSX.Element;propsMenubarSeparatorPropsreturnJSX.Element- Name
props- Kind
- parameter
- Type
MenubarSeparatorProps- Requirement
- required
- Name
return- Kind
- return value
- Type
JSX.Element- Requirement
- n/a
MenubarSeparatorProps
interfaceexport interface MenubarSeparatorProps extends JSX.HTMLAttributes<HTMLDivElement> { readonly as?: AsProp; readonly menuValue?: string;}asAsPropmenuValuestring- Name
as- Kind
- property
- Type
AsProp- Requirement
- optional
- Name
menuValue- Kind
- property
- Type
string- Requirement
- optional
MenubarSubContent
functionexport declare function MenubarSubContent(props: MenubarSubPartProps): JSX.Element;propsMenubarSubPartPropsreturnJSX.Element- Name
props- Kind
- parameter
- Type
MenubarSubPartProps- Requirement
- required
- Name
return- Kind
- return value
- Type
JSX.Element- Requirement
- n/a
MenubarSubPartProps
interfaceexport interface MenubarSubPartProps extends JSX.HTMLAttributes<HTMLDivElement> { readonly as?: AsProp; readonly itemKey?: string;}asAsPropitemKeystring- Name
as- Kind
- property
- Type
AsProp- Requirement
- optional
- Name
itemKey- Kind
- property
- Type
string- Requirement
- optional
MenubarSubTrigger
functionexport declare function MenubarSubTrigger(props: MenubarSubPartProps): JSX.Element;propsMenubarSubPartPropsreturnJSX.Element- Name
props- Kind
- parameter
- Type
MenubarSubPartProps- Requirement
- required
- Name
return- Kind
- return value
- Type
JSX.Element- Requirement
- n/a
MenubarTrigger
functionexport declare function MenubarTrigger(props: MenubarTriggerProps): JSX.Element;propsMenubarTriggerPropsreturnJSX.Element- Name
props- Kind
- parameter
- Type
MenubarTriggerProps- Requirement
- required
- Name
return- Kind
- return value
- Type
JSX.Element- Requirement
- n/a
MenubarTriggerProps
interfaceexport interface MenubarTriggerProps extends JSX.ButtonHTMLAttributes<HTMLButtonElement> { readonly as?: AsProp; readonly menu: MenubarMenu;}asAsPropmenuMenubarMenu- Name
as- Kind
- property
- Type
AsProp- Requirement
- optional
- Name
menu- Kind
- property
- Type
MenubarMenu- Requirement
- required
useMenubar
functionexport declare function useMenubar(input: () => MenubarInput, options?: UseMenubarOptions): UseMenubarResult;input() => MenubarInputoptionsUseMenubarOptionsreturnUseMenubarResult- Name
input- Kind
- parameter
- Type
() => MenubarInput- Requirement
- required
- Name
options- Kind
- parameter
- Type
UseMenubarOptions- Requirement
- optional
- Name
return- Kind
- return value
- Type
UseMenubarResult- Requirement
- n/a
useMenubarContext
functionexport declare function useMenubarContext(partName: string): MenubarContextValue;partNamestringreturnMenubarContextValue- Name
partName- Kind
- parameter
- Type
string- Requirement
- required
- Name
return- Kind
- return value
- Type
MenubarContextValue- Requirement
- n/a
UseMenubarOptions
interfaceexport interface UseMenubarOptions { readonly dir?: "ltr" | "rtl"; readonly onOpenChange?: (detail: MenubarOpenChangeDetail) => void; readonly onSelect?: (id: string, menuValue: string) => void; readonly scheduler?: Scheduler;}dir"ltr" | "rtl"onOpenChange(detail: MenubarOpenChangeDetail) => voidonSelect(id: string, menuValue: string) => voidschedulerScheduler- Name
dir- Kind
- property
- Type
"ltr" | "rtl"- Requirement
- optional
- Name
onOpenChange- Kind
- property
- Type
(detail: MenubarOpenChangeDetail) => void- Requirement
- optional
- Name
onSelect- Kind
- property
- Type
(id: string, menuValue: string) => void- Requirement
- optional
- Name
scheduler- Kind
- property
- Type
Scheduler- Requirement
- optional
UseMenubarResult
interfaceexport interface UseMenubarResult { readonly service: MenubarService; readonly connector: MenubarApi; readonly scope: PartScope; readonly snapshot: () => MenubarSnapshot;}connectorMenubarApiscopePartScopeserviceMenubarServicesnapshot() => MenubarSnapshot- Name
connector- Kind
- property
- Type
MenubarApi- Requirement
- required
- Name
scope- Kind
- property
- Type
PartScope- Requirement
- required
- Name
service- Kind
- property
- Type
MenubarService- Requirement
- required
- Name
snapshot- Kind
- property
- Type
() => MenubarSnapshot- Requirement
- required