Skip to main content
Version: 1.0.160

Segmented Buttons

const segmentedButtons = {
name: "segmented_buttons",
component: NANO.SEGMENTED_BUTTONS,
value: 'walk',
props: {
density: "small",
checkedColor: "primary",
uncheckedColor: "grey",
buttons:
[
{
value: 'walk',
label: 'Walking',
},
{
value: 'train',
label: 'Transit',
},
],
style: {
width: 10,
padding: 0
},
},
hide: false,
onValueChange: ({ setUi, getUi, methodValues }) => {
const segmentedButtonsObj = getUi("segmented_buttons")
segmentedButtonsObj.value = methodValues
setUi("segmented_buttons", segmentedButtonsObj)
}

};

Segmented buttons example

Loading...