segmented-control
The segmented-control is a horizontal control consisting of segments that allows you to toggle between multiple options in a compact, efficient way. It is commonly used for filtering content, switching views, or selecting categories within an app.
This component enhances user experience by providing a quick and intuitive way to navigate without needing drop-downs or separate screens. When designing a segmented control, consider:
Keeping the number of segments minimal for readability
Providing immediate visual feedback when a selection is made
Configuration options
Some properties are common to all components, see Common component properties for a list and their configuration options.
data
Specify the title to display in each segment and a data value. Repeat the title and value properties to create the number of segments in the control.
title
The label for the segment. You can use in the title.
value
The data value for the segment that is used to display content when toggled. Can be used in an expression or to set the initialValue.
initialValue
Configure which segment to display as active when the jig opens. By default there are no active segments. Tap the segment to activate it.
isDisabled
Set to true disables the segmented-control (ready only mode). By default the property's value is false.
Examples and code snippets
Basic segmented-control

This examples displays a basic segmented-control - A segmented-control with four segments. When a segment is tapped, its corresponding value is displayed in an entity-field.
Example: See the full example in GitHub.
Segmented-control with a datasource

This examples displays a segmented-control with a datasource - This segmented-control dynamically retrieves its titles and values from a datasource. It consists of three segments, when a segment is tapped, its value is displayed in an entity-field.
Example: See the full example in GitHub.
Disabled segmented-control

This examples displays a disabled segmented-control - A segmented-control with three segments that is set to a disabled state, preventing user interaction.
Example: See the full example in GitHub.
Preselected segmented-control

This examples displays a preselected segmented-control - A segmented-control with three segments, where the second segment is set as active by default when the jig opens. When a segment is tapped, its value is displayed in an entity-field.
Example: See the full example in GitHub.
Segmented-control using state
This example demonstrates how to configure the entity-field and form component state to display the relevant content based on the segment tapped. The value entered in the form when the Email segment is displayed is used to generate a PDF and share it via email.
Example: See the full example in GitHub.

Last updated
Was this helpful?