View as Markdown

API reference: @salmonui/navigation/accordion

AccordionItemPropsinterface

import type { AccordionItemProps } from '@salmonui/navigation/accordion';
interface AccordionItemProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {
    value: string;
    header: ReactNode;
    icon?: ReactNode;
    disabled?: boolean | undefined;
    hidden?: boolean | undefined;
    keepMounted?: boolean | undefined;
    forceMount?: boolean | undefined;
    headerProps?: ButtonHTMLAttributes<HTMLButtonElement> | undefined;
    panelProps?: HTMLAttributes<HTMLDivElement> | undefined;
    children?: ReactNode;
    ref?: Ref<HTMLDivElement> | undefined;
}
AccordionItemProps members (11)
NameSignatureDescription
valuevalue: string;

Stable item key reported in value.

headerheader: ReactNode;

Header content (the label of the header button and of the panel region).

iconoptionalicon?: ReactNode;

Decorative icon before the header content.

disabledoptionaldisabled?: boolean | undefined;

Header button gets aria-disabled and does not toggle.

hiddenoptionalhidden?: boolean | undefined;

Renders nothing.

keepMountedoptionalkeepMounted?: boolean | undefined;

Overrides the accordion's keepMounted for this item.

forceMountoptionalforceMount?: boolean | undefined;

Overrides the accordion's forceMount for this item.

headerPropsoptionalheaderProps?: ButtonHTMLAttributes<HTMLButtonElement> | undefined;

Props of the header <button> (className, style, onClick, data-*, ...).

panelPropsoptionalpanelProps?: HTMLAttributes<HTMLDivElement> | undefined;

Props of the panel region (className, style, ...).

childrenoptionalchildren?: ReactNode;

Panel content; mounted on first expand.

refoptionalref?: Ref<HTMLDivElement> | undefined;