Bixby Developer Center

Guides
References

slider

optional

A control component that is used in a form, which enables a slider component, with a sliding scale for users to indicate a value from a given range.

Note

In order for this component to pass the information to Bixby, users must click the submit button. The platform does not support live updating based on the state change of a given component.

Examples

Here is a structure, which has a property funMeter that can be populated with a slider element in a form:

structure (Survey) {
property (fullName) {
type (FullName)
min (Required) max (One)
}
property (email) {
type(Email)
min (Required) max(One)
}
property (comments) {
type (Comments)
min (Optional) max (One)
}
property (isSigningUp) {
type (IsSigningUp)
min (Required) max (One)
}
property (favoriteColors) {
type (FavoriteColors)
min (Required) max (One)
}
property (funMeter) {
type (FunMeter)
min (Required) max (One)
}
property (age) {
type (Age)
min (Required) max (One)
}
}

View master on GitHub

For the input view of a slider:

input-view {
match {
FunMeter (funMeter) {
to-input: SubmitSurvey
}
}

message {
template ("How much fun are you having?")
}

render {
form {
elements {
slider {
id (funMeter)
min-value (0)
max-value (10)
min-label (0 - Lowest)
max-label (10 - Highest)
step (1)
type (FunMeter)
value ("#{raw(funMeter)}")

}
}
on-submit {
goal: FunMeter
value: viv.core.FormElement(funMeter)
}
}
}
}

View master on GitHub

You can run the sample capsule in the Simulator to see how this component displays on different devices, if supported.

Child Keys

id
required
Unique identifier to map between an element in the form and property values set in the on-submit intent container
max-value
required
Maximum allowed value
min-value
required
Minimum allowed value
step
required
Interval between accepted values
type
required
Concept type of element being inputted
max-label
optional
Label for maximum value of slider
min-label
optional
Label for minimum value
value
optional
Initial value of element