View as Markdown

API reference: @salmonui/buttons/button

ToggleButtonGroupSinglePropsinterface

import type { ToggleButtonGroupSingleProps } from '@salmonui/buttons/button';
interface ToggleButtonGroupSingleProps extends ToggleButtonGroupBaseProps {
    selectionMode?: 'single' | undefined;
    value?: string | null | undefined;
    defaultValue?: string | null | undefined;
    onValueChange?: ((value: string | null, event: ToggleChangeEvent) => void) | undefined;
}
ToggleButtonGroupSingleProps members (14, 10 inherited)
NameSignatureDescription
selectionModeoptionalselectionMode?: 'single' | undefined;

APG Radio Group: role="radiogroup", items role="radio"; arrow keys move and select.

valueoptionalvalue?: string | null | undefined;
defaultValueoptionaldefaultValue?: string | null | undefined;
onValueChangeoptionalonValueChange?: ((value: string | null, event: ToggleChangeEvent) => void) | undefined;
childrenoptionalinheritedchildren?: ReactNode;

ToggleButton items, each with a value.

orientationoptionalinheritedorientation?: "horizontal" | "vertical";

Layout and arrow-key axis. Default 'horizontal'.

attachedoptionalinheritedattached?: boolean;

Joined borders. Default true, false for variant="chip".

variantoptionalinheritedvariant?: ButtonVariant;

Default variant of the items; 'chip' gives choice and filter chips.

toneoptionalinheritedtone?: ButtonTone;

Default tone of the items.

sizeoptionalinheritedsize?: ButtonSize;

Default size of the items.

disabledoptionalinheriteddisabled?: boolean;

Disables every item; nothing is submitted while disabled.

disallowEmptyoptionalinheriteddisallowEmpty?: boolean;

Keeps one value selected (single) or at least one (multiple). Default false.

nameoptionalinheritedname?: string;

Form field name: one hidden input per selected value.

refoptionalinheritedref?: Ref<HTMLDivElement>;