Skip to content

buttonChooser

buttonChooser(opts): void

Defined in: components/buttonChooser.ts:45

A single-selection segmented control: an attached button group where exactly one button is active at a time. Optionally allows deselecting back to undefined.

Renders a hidden <input> alongside (when name is set) so the selected value is included in native form submission.

ButtonChooserOptions

void

const $view = A.proxy({ value: "day" as string | undefined });
S.buttonChooser({
options: { day: "Day", week: "Week", month: "Month" },
bind: $view,
});