Skip to content
Frauthy Brand
Frauthy index

Go anywhere.

    No exact contract found. Try a component family, product name, prop, or keyboard key.

    ↑↓ move↵ openesc close

    Menu

    interactive

    Trigger button plus ARIA menu with roving tabindex, disabled items, link items, end alignment, and destructive item treatment.

    Preview

    Usage

    import { Menu } from 'PRIVATE_BETA_PACKAGE_COORDINATE_REDACTED';
    
    <Menu
      label="Actions"
      items={[
        { label: 'Edit details', onSelect: edit },
        { label: 'Duplicate record', onSelect: duplicate },
        { label: 'Archive record', disabled: true },
        { label: 'Delete record', danger: true, onSelect: deleteRecord },
      ]}
    />

    Props

    PropTypeDefaultDescription
    labelJSX.ElementrequiredTrigger button content
    itemsMenuItem[]requiredMenu item definitions
    align'start' | 'end''start'Horizontal popover alignment relative to the trigger
    idstringgeneratedStable root id used to derive trigger and menu ids
    disabledbooleanfalseDisables the trigger button
    aria-labelstring--Accessible label override for the trigger button
    menuLabelstring--Accessible label for icon-only menus
    classstring--Additional classes on the root wrapper

    MenuItem interface

    FieldTypeDescription
    idstringOptional stable id for the item
    labelJSX.ElementVisible item label
    hrefstringRenders the item as a link when set
    disabledbooleanMarks the item unavailable and skips it during roving focus
    dangerbooleanApplies destructive action treatment
    onSelect() => voidCalled when an enabled item is selected

    Accessibility

    Do / Don't

    Do

    Use menus for compact action sets where each item performs a command or navigates to a related destination.

    Don't

    Don't put form controls or complex interactive content inside a menu item list.