@antadesign/anta
    Preparing search index...

    Interface AMenuAttributesUnreviewed

    Attributes for the <a-menu> custom element. Placed immediately after the trigger it anchors to (root menu), or nested inside an <a-menu-item> (submenu). For the typed JSX wrapper use Menu from @antadesign/anta.

    interface AMenuAttributes {
        onClick?: (e: any) => void;
        onDoubleClick?: (e: any) => void;
        onAuxClick?: (e: any) => void;
        onContextMenu?: (e: any) => void;
        onMouseDown?: (e: any) => void;
        onMouseUp?: (e: any) => void;
        onMouseEnter?: (e: any) => void;
        onMouseLeave?: (e: any) => void;
        onMouseMove?: (e: any) => void;
        onMouseOver?: (e: any) => void;
        onMouseOut?: (e: any) => void;
        onPointerDown?: (e: any) => void;
        onPointerUp?: (e: any) => void;
        onPointerMove?: (e: any) => void;
        onPointerEnter?: (e: any) => void;
        onPointerLeave?: (e: any) => void;
        onPointerOver?: (e: any) => void;
        onPointerOut?: (e: any) => void;
        onPointerCancel?: (e: any) => void;
        onGotPointerCapture?: (e: any) => void;
        onLostPointerCapture?: (e: any) => void;
        onTouchStart?: (e: any) => void;
        onTouchEnd?: (e: any) => void;
        onTouchMove?: (e: any) => void;
        onTouchCancel?: (e: any) => void;
        onKeyDown?: (e: any) => void;
        onKeyUp?: (e: any) => void;
        onFocus?: (e: any) => void;
        onBlur?: (e: any) => void;
        onChange?: (e: any) => void;
        onInput?: (e: any) => void;
        onBeforeInput?: (e: any) => void;
        onInvalid?: (e: any) => void;
        onReset?: (e: any) => void;
        onSubmit?: (e: any) => void;
        onSelect?: (e: any) => void;
        onCopy?: (e: any) => void;
        onCut?: (e: any) => void;
        onPaste?: (e: any) => void;
        onCompositionStart?: (e: any) => void;
        onCompositionUpdate?: (e: any) => void;
        onCompositionEnd?: (e: any) => void;
        onDrag?: (e: any) => void;
        onDragStart?: (e: any) => void;
        onDragEnd?: (e: any) => void;
        onDragEnter?: (e: any) => void;
        onDragLeave?: (e: any) => void;
        onDragOver?: (e: any) => void;
        onDrop?: (e: any) => void;
        onScroll?: (e: any) => void;
        onWheel?: (e: any) => void;
        onAnimationStart?: (e: any) => void;
        onAnimationEnd?: (e: any) => void;
        onAnimationIteration?: (e: any) => void;
        onTransitionEnd?: (e: any) => void;
        onLoad?: (e: any) => void;
        onError?: (e: any) => void;
        onAbort?: (e: any) => void;
        onToggle?: (e: any) => void;
        onBeforeToggle?: (e: any) => void;
        onCanPlay?: (e: any) => void;
        onCanPlayThrough?: (e: any) => void;
        onDurationChange?: (e: any) => void;
        onEmptied?: (e: any) => void;
        onEnded?: (e: any) => void;
        onLoadedData?: (e: any) => void;
        onLoadedMetadata?: (e: any) => void;
        onLoadStart?: (e: any) => void;
        onPause?: (e: any) => void;
        onPlay?: (e: any) => void;
        onPlaying?: (e: any) => void;
        onProgress?: (e: any) => void;
        onRateChange?: (e: any) => void;
        onSeeked?: (e: any) => void;
        onSeeking?: (e: any) => void;
        onStalled?: (e: any) => void;
        onSuspend?: (e: any) => void;
        onTimeUpdate?: (e: any) => void;
        onVolumeChange?: (e: any) => void;
        onWaiting?: (e: any) => void;
        key?: string | number | null;
        id?: string;
        class?: string;
        className?: string;
        style?: CSSProperties;
        children?: ReactNode;
        slot?: string;
        tabIndex?: number;
        placement?:
            | "bottom-start"
            | "bottom-end"
            | "top-start"
            | "top-end"
            | "bottom"
            | "top"
            | "right-start"
            | "right-end"
            | "left-start"
            | "left-end"
            | "right"
            | "left";
        context?: boolean
        | "";
        coord?: boolean | "";
        nohover?: boolean | "";
        round?: boolean | number | string;
        offset?: number | string;
        autowidth?: boolean | "";
        state?: "open" | "closed";
        onstatechange?: (
            e: CustomEvent<{ next: "open" | "closed"; prev: "open" | "closed" }>,
        ) => void;
        onactivedescendant?: (e: CustomEvent<{ id: string | null }>) => void;
        "stop-propagation"?: string;
        role?: string;
        "aria-orientation"?: "vertical" | "horizontal";
    }

    Hierarchy (View Summary)

    Index
    onClick?: (e: any) => void
    onDoubleClick?: (e: any) => void
    onAuxClick?: (e: any) => void
    onContextMenu?: (e: any) => void
    onMouseDown?: (e: any) => void
    onMouseUp?: (e: any) => void
    onMouseEnter?: (e: any) => void
    onMouseLeave?: (e: any) => void
    onMouseMove?: (e: any) => void
    onMouseOver?: (e: any) => void
    onMouseOut?: (e: any) => void
    onPointerDown?: (e: any) => void
    onPointerUp?: (e: any) => void
    onPointerMove?: (e: any) => void
    onPointerEnter?: (e: any) => void
    onPointerLeave?: (e: any) => void
    onPointerOver?: (e: any) => void
    onPointerOut?: (e: any) => void
    onPointerCancel?: (e: any) => void
    onGotPointerCapture?: (e: any) => void
    onLostPointerCapture?: (e: any) => void
    onTouchStart?: (e: any) => void
    onTouchEnd?: (e: any) => void
    onTouchMove?: (e: any) => void
    onTouchCancel?: (e: any) => void
    onKeyDown?: (e: any) => void
    onKeyUp?: (e: any) => void
    onFocus?: (e: any) => void
    onBlur?: (e: any) => void
    onChange?: (e: any) => void
    onInput?: (e: any) => void
    onBeforeInput?: (e: any) => void
    onInvalid?: (e: any) => void
    onReset?: (e: any) => void
    onSubmit?: (e: any) => void
    onSelect?: (e: any) => void
    onCopy?: (e: any) => void
    onCut?: (e: any) => void
    onPaste?: (e: any) => void
    onCompositionStart?: (e: any) => void
    onCompositionUpdate?: (e: any) => void
    onCompositionEnd?: (e: any) => void
    onDrag?: (e: any) => void
    onDragStart?: (e: any) => void
    onDragEnd?: (e: any) => void
    onDragEnter?: (e: any) => void
    onDragLeave?: (e: any) => void
    onDragOver?: (e: any) => void
    onDrop?: (e: any) => void
    onScroll?: (e: any) => void
    onWheel?: (e: any) => void
    onAnimationStart?: (e: any) => void
    onAnimationEnd?: (e: any) => void
    onAnimationIteration?: (e: any) => void
    onTransitionEnd?: (e: any) => void
    onLoad?: (e: any) => void
    onError?: (e: any) => void
    onAbort?: (e: any) => void
    onToggle?: (e: any) => void
    onBeforeToggle?: (e: any) => void
    onCanPlay?: (e: any) => void
    onCanPlayThrough?: (e: any) => void
    onDurationChange?: (e: any) => void
    onEmptied?: (e: any) => void
    onEnded?: (e: any) => void
    onLoadedData?: (e: any) => void
    onLoadedMetadata?: (e: any) => void
    onLoadStart?: (e: any) => void
    onPause?: (e: any) => void
    onPlay?: (e: any) => void
    onPlaying?: (e: any) => void
    onProgress?: (e: any) => void
    onRateChange?: (e: any) => void
    onSeeked?: (e: any) => void
    onSeeking?: (e: any) => void
    onStalled?: (e: any) => void
    onSuspend?: (e: any) => void
    onTimeUpdate?: (e: any) => void
    onVolumeChange?: (e: any) => void
    onWaiting?: (e: any) => void
    key?: string | number | null

    React/Preact reconciliation key when rendered inside a list.

    id?: string

    HTML id attribute.

    class?: string

    HTML class attribute (standard DOM).

    className?: string

    React/Preact-style class name. Alias for class.

    style?: CSSProperties

    Inline styles applied to the element.

    children?: ReactNode
    slot?: string

    Assigns the element to a named <slot> (e.g. slot="title").

    tabIndex?: number

    Tab order. Set to 0 to make the element keyboard-focusable.

    placement?:
        | "bottom-start"
        | "bottom-end"
        | "top-start"
        | "top-end"
        | "bottom"
        | "top"
        | "right-start"
        | "right-end"
        | "left-start"
        | "left-end"
        | "right"
        | "left"

    Preferred placement relative to the trigger; auto-flips / clamps. Defaults to 'bottom-start'. right / left place the menu beside the trigger.

    context?: boolean | ""

    Open on right-click of the trigger region, positioned at the pointer. Presence-based ('' on, omit off).

    coord?: boolean | ""

    Open at the pointer coordinates instead of aligned to the trigger box. Presence-based ('' on, omit off).

    nohover?: boolean | ""

    Submenus only (an <a-menu> nested inside an <a-menu-item> — detected from that structure; ignored on a root menu). Submenus open on hover by default; this opts out, making the submenu click-only. Presence-based ('' on, omit off).

    round?: boolean | number | string

    Round: container softens to a 20px radius and its items go fully round. A length value (round="12px") tunes the container radius only (items stay pills). Presence-based for the boolean form.

    offset?: number | string

    Gap in pixels between the trigger and the menu. Defaults to 4.

    autowidth?: boolean | ""

    Size the menu to its content instead of flooring its width to the trigger. By default a root menu is never narrower than its trigger; autowidth drops that floor (min-width falls back to --menu-min-width) for a content menu under a wide trigger, e.g. InputDate's calendar below a full-width field. Presence-based ('' on, omit off).

    state?: "open" | "closed"

    Controlled open state ('open' / 'closed'). Omit for uncontrolled; present → visibility follows this value, and the element never writes it (the consumer owns it). Listen to statechange to keep it in sync. See STATEFUL-COMPONENTS.md.

    onstatechange?: (
        e: CustomEvent<{ next: "open" | "closed"; prev: "open" | "closed" }>,
    ) => void

    State-change event — cancelable, fired before applying, with detail: { next, prev } in the 'open'|'closed' vocabulary (plus optional coord / originEvent). All-lowercase so React/Preact bind it to the element's statechange CustomEvent. The Menu wrapper exposes this as the onStateChange prop.

    onactivedescendant?: (e: CustomEvent<{ id: string | null }>) => void

    Combobox-mode cursor report for custom fields and observers. Fires when the active option changes, with detail.id containing an authored option ID or null. Built-in Anta Inputs receive a direct ARIA element relation. All-lowercase so React/Preact bind it to the CustomEvent.

    "stop-propagation"?: string

    Contain events so they don't bubble out of the menu surface to ancestor / document handlers. Space- or comma-separated event names (stop-propagation="click pointerdown"); a bare / empty attribute defaults to click. Menu-item / data-menu-close selections are always contained; this extends containment to whole event types.

    role?: string

    ARIA role — the JSX wrapper sets this to 'menu'.

    "aria-orientation"?: "vertical" | "horizontal"