Segmented
孟帅、吴甲明November 2, 2026About 1 min
Start with the basic example, then compare related settings before moving to controlled, asynchronous or combined use cases.
| Configuration | Purpose | Related examples |
|---|
size | Size | Segment sizes and disabled states |
options | Action list | Segment sizes and disabled states |
disabled | Disable interaction | Segment sizes and disabled states |
default-value | Uncontrolled default value | Segment sizes and disabled states |
Compare density at each size and disabled-option behavior.
| Configuration | Purpose | Related examples |
|---|
block | Fill parent width | Block |
options | Action list | Block |
block: Fit parent widthoptions: Options
model-value: Binding valueoptions: Options
- The root uses
role="radiogroup"; native radio options support keyboard changes. name binds a native form field name.- Whole-control disabling sets
aria-disabled.
| Arguments | Description | Type | Default |
|---|
| model-value / v-model | Current value | string | number | — |
| default-value | Uncontrolled default value | string | number | — |
| options | Action list | (string | number | SegmentedOption)[] | [] |
| size | Size | xs | sm | md | lg | xl | md |
| disabled | Disable interaction | boolean | false |
| block | Fill parent width | boolean | false |
| orientation | Horizontal/vertical arrangement of segmented options, default horizontal; not text reading direction | horizontal | vertical | horizontal |
| name | Native name | string | — |
| Field | Description | Type |
|---|
| label | Label | string | () => VNodeChild |
| value | Value | string | number |
| disabled | Disable this item | boolean |
| Event | Description | Arguments |
|---|
| change | Value change | (value, event) |
| update:model-value | v-model | (value) |
| Slot | Description | Arguments |
|---|
| label | Custom option content | { data: SegmentedOption } |