@antadesign/anta
    Preparing search index...

    Interface AExpanderAttributesUnreviewed

    Attributes for the <a-expander> collapsible disclosure.

    The element builds its own shadow DOM (no native <details>): a <button> summary carrying aria-expanded plus an animated content region. The title is projected via slot="title"; header actions (rendered next to the trigger, outside it) via slot="actions"; the body is the default slot. Low-level attributes; for the JSX wrapper use Expander from @antadesign/anta.

    interface AExpanderAttributes {
        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;
        role?: string;
        indicator?: "chevron" | "triangle" | "plus";
        "indicator-placement"?: "start" | "end";
        state?: "open" | "closed";
        "default-state"?: "open" | "closed";
        priority?: "primary" | "secondary" | "tertiary";
        outdent?: boolean | "";
        disabled?: boolean | "";
        round?: boolean | number | string;
        tone?:
            | "neutral"
            | "brand"
            | "info"
            | "success"
            | "warning"
            | "critical"
            | string & {};
        level?: "1"
        | "2"
        | "3"
        | "4"
        | "5"
        | "6";
        onstatechange?: (
            e: CustomEvent<{ next: "open" | "closed"; prev: "open" | "closed" }>,
        ) => void;
    }

    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.

    role?: string

    ARIA role override.

    indicator?: "chevron" | "triangle" | "plus"

    Built-in disclosure mark. Custom visuals use slot="indicator". Defaults to chevron.

    "indicator-placement"?: "start" | "end"

    Logical side for the disclosure mark. Defaults to start.

    state?: "open" | "closed"

    Controlled open state ('open' / 'closed'). Present → controlled: the attribute is the source of truth, clicks only dispatch the cancelable statechange event, and the consumer answers by updating it. Absent → uncontrolled (use default-state). See STATEFUL-COMPONENTS.md.

    "default-state"?: "open" | "closed"

    Initial open state for the uncontrolled mode ('open' / 'closed'); read once when the element connects.

    priority?: "primary" | "secondary" | "tertiary"

    Surface emphasis. secondary (default) is a subtle fill; primary is a stronger raised fill; tertiary is transparent.

    outdent?: boolean | ""

    Align the title and body with surrounding content on a tertiary expander. The start indicator hangs in the gutter; an end indicator stays inside its edge. Presence-based.

    disabled?: boolean | ""

    Disables the header: not clickable or focusable, hover affordance off, text dimmed. The open state freezes as-is. Presence-based.

    round?: boolean | number | string

    Round corners sized to half the folded (header) height — a pill when folded, the same radius when expanded (the element measures the header and publishes --_expander-round-radius). A length value (round="12px") is a fixed radius that overrides the measurement. Presence-based for the boolean form.

    tone?:
        | "neutral"
        | "brand"
        | "info"
        | "success"
        | "warning"
        | "critical"
        | string & {}

    Semantic tone, or any literal CSS color for a one-off custom tone. Named tones re-point the text + filled surface palette; a custom color keeps its hue with lightness/chroma pinned. 'neutral' is the default (same as omitting it).

    level?: "1" | "2" | "3" | "4" | "5" | "6"

    Heading type scale for the summary, '1'–'6' (mirrors <a-title> levels). Default (omitted) ≈ level 5.

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

    Fires before the open state changes — the element dispatches a cancelable statechange CustomEvent whose detail is { next, prev } in the 'open'|'closed' vocabulary. Uncontrolled, preventDefault() vetoes the transition. The all-lowercase spelling is deliberate — it's the one form both renderers bind to the statechange event (React 19 keeps the case after on, so onStateChange would listen for "StateChange"; Preact lowercases).