UI Headless Runtime API - v1.0.0
    Preparing search index...

    Interface AccordionOptions

    Accordion options using the shared controllable state contract.

    interface AccordionOptions {
        collapsible?: boolean;
        defaultValue?: readonly string[];
        getValue?: () => readonly string[];
        id?: string;
        loop?: boolean;
        onValueChange?: (
            value: readonly string[],
            details: ChangeDetails<AccordionChangeReason>,
        ) => void;
        subscribeValue?: (listener: () => void) => Unsubscribe;
        type?: AccordionType;
    }

    Hierarchy

    Index

    Properties

    collapsible?: boolean

    Allows the single open item to collapse.

    false

    defaultValue?: readonly string[]

    Initial value used only in uncontrolled mode.

    getValue?: () => readonly string[]

    Reads the consumer-owned value. Its presence enables controlled mode.

    id?: string

    Stable ID prefix for item relationships.

    loop?: boolean

    Wraps trigger focus at collection edges.

    true

    onValueChange?: (
        value: readonly string[],
        details: ChangeDetails<AccordionChangeReason>,
    ) => void

    Receives every accepted value request and its typed cause.

    subscribeValue?: (listener: () => void) => Unsubscribe

    Subscribes to consumer-owned value changes in controlled mode.

    Single or multiple expansion mode.

    single