Skip to content
NativeScript Unified

NativeScript views

Switch, Slider and pickers

ViewInputsOutput
SwitchcheckedcheckedChange
Slidermin, max, valuevalueChange
SearchBarhint (placeholder), textsearch (on submit), textChange
SegmentedBarselectedIndex, with ns-segmented-bar-item children that have a titleselectedIndexChange
ListPickeritems (comma-separated), selectedIndexselectedIndexChange
DatePickeryear, month, day (month and day start at 1), minDate, maxDatedateChange (YYYY-MM-DD)
TimePickerhour, minute, minHour, maxHour, minMinute, maxMinutetimeChange (HH:MM)

Switch

Slider

SegmentedBar

ListPicker

DatePicker and TimePicker

HTML-first equivalent

Each of these has a Spartan helm counterpart with a live example:

NativeScript viewHTML first
Switchhlm-switch on Form controls
Sliderhlm-slider on Slider
SearchBarinput hlmInput type="search" on Form controls
SegmentedBarhlmToggleGroup on More components
ListPickerhlm-select on Select
DatePickerhlm-calendar on Calendar

A TimePicker has no helm counterpart. For a date field, packages/ui/helm also has a date-picker, which these pages do not cover.