interface AccordionSummaryProps {
    badge?: ReactElement<BadgeProps, string | JSXElementConstructor<any>> | ReactElement<BadgeProps, string | JSXElementConstructor<any>>[];
    className?: string;
    customAttribute?: {
        attribute: string;
        value: string | number;
    };
    disabled?: boolean;
    expanded?: boolean;
    id?: string;
    isLoading?: boolean;
    lang?: "sv" | "en";
    onClick?: (() => void);
    slots?: {
        meta?: SlotContent<"meta">;
        startAdornment?: SlotContent<"startAdornment">;
    };
    subtitle?: ReactNode;
    title: ReactNode;
    titleComponent?: ElementType<any, (keyof IntrinsicElements)>;
    titleFontWeight?: "bold" | "medium" | "regular";
    titleVariant?:
        | "h2"
        | "h3"
        | "h4"
        | "body1";
}

Properties

badge?: ReactElement<BadgeProps, string | JSXElementConstructor<any>> | ReactElement<BadgeProps, string | JSXElementConstructor<any>>[]

Badge to be displayed in the accordion summary.

className?: string

Optional CSS class name.

customAttribute?: {
    attribute: string;
    value: string | number;
}

Used for tests. Clickable and requested subcomponents will be suffixed with "-[ComponentName]".

disabled?: boolean

If true, the component is disabled.

expanded?: boolean

Controls the expanded state of the accordion. Use this prop along with onChange to create a controlled component where you need to manage the state yourself. If not provided, the accordion will be uncontrolled and manage its own state internally.

id?: string

A unique identifier for the component. Used internally for setting WAI-ARIA relationships.

isLoading?: boolean

If true, a loading skeleton will be rendered instead of the component.

lang?: "sv" | "en"

Language used for internal translations.

onClick?: (() => void)

Callback when the item is clicked.

slots?: {
    meta?: SlotContent<"meta">;
    startAdornment?: SlotContent<"startAdornment">;
}

Slots for meta and startAdornment.

subtitle?: ReactNode

Subtitle text in the AccordionSummary.

title: ReactNode

Main title text in the AccordionSummary.

titleComponent?: ElementType<any, (keyof IntrinsicElements)>

Component used for the title, defaults to h2.

titleFontWeight?: "bold" | "medium" | "regular"

Font weight of the title text.

titleVariant?:
    | "h2"
    | "h3"
    | "h4"
    | "body1"

Variant of the title text.