Skip to content

Choice Chips

Shared wrapping choice control for compact presets and granularities.

export function ChoiceChips<T extends ChoiceChipValue = ChoiceChipValue>({
value,
options,
onChange,
ariaLabel,
appearance = 'soft',
size = 'medium',
className = '',
itemClassName = '',
disabled = false,
testId,
}: ChoiceChipsProps<T>): any;

export type ChoiceChipValue = string | number;

export type ChoiceChipOption<T extends ChoiceChipValue = ChoiceChipValue> = {
value: T;
label: any;
ariaLabel?: string;
title?: string;
disabled?: boolean;
className?: string;
style?: any;
testId?: string;
};

export type ChoiceChipsProps<T extends ChoiceChipValue = ChoiceChipValue> = {
value?: T | readonly T[];
options: readonly ChoiceChipOption<T>[];
onChange: (value: T, option: ChoiceChipOption<T>) => void;
ariaLabel: string;
appearance?: 'soft' | 'outlined';
size?: 'small' | 'medium';
className?: string;
itemClassName?: string;
disabled?: boolean;
testId?: string;
};