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

    Interface DisclosureOptions

    Disclosure configuration supporting consumer-owned or internal state.

    interface DisclosureOptions {
        defaultValue?: boolean;
        disabled?: boolean;
        getValue?: () => boolean;
        id?: string;
        onValueChange?: (
            value: boolean,
            details: ChangeDetails<DisclosureChangeReason>,
        ) => void;
        subscribeValue?: (listener: () => void) => Unsubscribe;
    }

    Hierarchy

    Index

    Properties

    defaultValue?: boolean

    Initial value used only in uncontrolled mode.

    disabled?: boolean

    Prevents interaction while preserving semantic state.

    getValue?: () => boolean

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

    id?: string

    Deterministic ID base used for trigger/panel relationships.

    onValueChange?: (
        value: boolean,
        details: ChangeDetails<DisclosureChangeReason>,
    ) => void

    Receives every accepted value request and its typed cause.

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

    Subscribes to consumer-owned value changes in controlled mode.