@yarcl/react
    Preparing search index...

    Type Alias AccordionProps

    AccordionProps: AccordionBaseProps & (
        | {
            collapsible?: boolean;
            defaultValue?: string
            | null;
            onValueChange?: (value: string | null) => void;
            type: "single";
            value?: string | null;
        }
        | {
            collapsible?: never;
            defaultValue?: string[];
            onValueChange?: (value: string[]) => void;
            type: "multiple";
            value?: string[];
        }
    )

    Props for Accordion. type decides whether one or many items can be open.

    Type Declaration

    • {
          collapsible?: boolean;
          defaultValue?: string | null;
          onValueChange?: (value: string | null) => void;
          type: "single";
          value?: string | null;
      }
      • Optionalcollapsible?: boolean

        Lets the open item close, leaving all closed. When false, one item always stays open.

        true
        
      • OptionaldefaultValue?: string | null

        Initially open item (uncontrolled).

      • OptionalonValueChange?: (value: string | null) => void

        Called with the open item, or null when it closes.

      • type: "single"

        One item open at a time.

      • Optionalvalue?: string | null

        Open item (controlled), or null when all are closed.

    • {
          collapsible?: never;
          defaultValue?: string[];
          onValueChange?: (value: string[]) => void;
          type: "multiple";
          value?: string[];
      }
      • Optionalcollapsible?: never
      • OptionaldefaultValue?: string[]

        Initially open items (uncontrolled).

      • OptionalonValueChange?: (value: string[]) => void

        Called with all open items.

      • type: "multiple"

        Any number of items open.

      • Optionalvalue?: string[]

        Open items (controlled).