<segmented-button>
A row of joined Material 3 segments that picks one option, published as a variable.
<column style="w-full gap-12">
<text style="font-semibold">Map style</text>
<segmented-button id="mode"
name="mode">
<segment value="map"
icon="map"
label="Map"
selected="true"/>
<segment value="satellite"
icon="satellite_alt"
label="Satellite"/>
<segment value="terrain"
icon="terrain"
label="Terrain"/>
</segmented-button>
</column>
Attributes
| Name | What it does | Default |
|---|---|---|
name |
Variable name for form scoping string |
Readings
| Name | What it does |
|---|---|
count |
How many options the control offers. |
index |
The selected option's position, from 0; -1 when none. |
label |
The selected option's text; empty when none is selected. |
value |
The selected option's value; empty when none is selected. |
Any tag also takes gestures: @on.tap, @on.longpress, @on.doubletap and @on.swipeleft (and right, up and down). @click runs on a tap too.