View as Markdown

API reference: @salmonui/buttons/tag-group

TagPropsinterface

import type { TagProps } from '@salmonui/buttons/tag-group';
interface TagProps extends Omit<HTMLAttributes<HTMLDivElement>, 'role' | 'children'> {
    value: string;
    children?: ReactNode;
    textValue?: string | undefined;
    iconStart?: ReactNode;
    iconEnd?: ReactNode;
    tone?: TagTone | undefined;
    disabled?: boolean | undefined;
    removable?: boolean | undefined;
    ref?: Ref<HTMLDivElement> | undefined;
}
TagProps members (9)
NameSignatureDescription
valuevalue: string;

Stable identity, reported in every event and submitted with name.

childrenoptionalchildren?: ReactNode;
textValueoptionaltextValue?: string | undefined;

Plain-text label when children is not a string (remove button name).

iconStartoptionaliconStart?: ReactNode;
iconEndoptionaliconEnd?: ReactNode;
toneoptionaltone?: TagTone | undefined;
disabledoptionaldisabled?: boolean | undefined;
removableoptionalremovable?: boolean | undefined;

false opts this tag out of removal. Default: removable when the group has onRemove.

refoptionalref?: Ref<HTMLDivElement> | undefined;