Skip to content
Binary UIKit reference Stable

ContextMenu

Right-click action menu with consumer-owned trigger styling and eyebrow-styled group headers.

Use ContextMenu for actions tied to a specific region when a conventional menu trigger would add clutter. Apply delegated trigger props to one real target element. Use a native focusable element, or add the correct role and `tabindex="0"` to a custom target so keyboard users can reach it. ContextMenu does not style target typography. Apply a semantic utility such as `bd-body`. Header items use the shared eyebrow typography recipe.

Interactive example

Loading interactive example

API

MemberTypeKindRequiredDefault
itemsMenuItem[]propYes
onSelect(item: MenuAction) => voidcallbackNoundefined
triggerSnippet<[Record<string, unknown>]>snippetYes

Source

Loading source