options

defines segments of a segmented button

array options;

Example

webix.ui({
    view:"segmented",
    value:"one",
    options:[
        { "id":"one", "value":"One" },
        { "id":"two", "value":"Two" },
        { "id":"three", "value":"Three" }
    ]
})

Related samples

Details

The property expects an array of either strings or objects, each of which presents a select option on a toolbar.

The objects in the array can have 3 attributes:

  • id - (string, number) the item ID, which serves as the real value of the segment for inner logic
  • value - (string) the item label, which is the displayed string of the segment
  • width - (number) optional, the item width

Note that the getValue method returns the ID of the selected option.

See also
Back to top