SegmentGroup
Forms
Smart auto-detect
A group of radio-like buttons that look like a single segmented control.
Usage
CMS Page Builder
This component is available as a segmentGroup block in the Page Builder (content/pages/*.json):
{
"type": "segmentGroup",
"label": "View",
"items": [
{ "label": "List", "value": "list" },
{ "label": "Grid", "value": "grid" }
]
}
Props
| Prop | Type | Default | Description |
|---|---|---|---|
label | string | - | Group label. |
items | SegmentGroupItem[] | - | Array of items with label and value. |
CMS Configuration
- label: SegmentGroup
name: segment-group
widget: object
fields:
- { label: Label, name: label, widget: string, required: false }
- label: Items
name: items
widget: list
fields:
- { label: Label, name: label, widget: string }
- { label: Value, name: value, widget: string }
Hydration
Tier-2: Hydrates when value, defaultValue, or onValueChange is provided.