SelectOption
An option, as HTML's <option>: the value the app keeps, and the label the user reads.
Usage
Switch between day, week and month
This type is used by SegmentedControl
import { SegmentedControl, Text, VStack, signal } from 'kuito';
const VIEWS = [
{ value: 'day', label: 'Day' },
{ value: 'week', label: 'Week' },
{ value: 'month', label: 'Month' },
];
export default function Plan() {
const view = signal('week');
return (
<VStack gap={8} padding={16}>
<SegmentedControl label="View" options={VIEWS} value={view} height={32} />
<Text>{view.value}</Text>
</VStack>
);
}Type declaration
export type SelectOption = { value: string; label: string };Members 2
| Name | Type | Required | Description |
|---|---|---|---|
value | string | Yes | — |
label | string | Yes | — |
Generated from the public TypeScript declarations: signatures, props and defaults come from the checked source, descriptions from its JSDoc. No defaults are invented.