- Select the Picker component from the Components drawer. You can open the list of components by clicking the
+button next to Components.
- To display pre-defined values, add an array of objects representing the options (see Data Properties) as a variable from the Variables modal in the top panel.
- Then, add the Picker component from the Components tree.
- Go to the Data tab (third tab) in the Properties Panel.
- For the Options property, select the variable key (in the example below,
datais the key that contains an array of strings).
We support 2 picker modes - Native and Dropdown
This mode provide a seamless, platform-specific user experience. It provide the native look and feel of pickers on both iOS and Android, ensuring users feel comfortable and familiar when interacting with it.
The Picker uses the react-native-dropdown-picker package to create a dropdown-style interface. It offers a familiar user experience and is highly customizable. This mode ensures a consistent UI across iOS and Android platforms.
We offer the
Picker Item component to assist in customizing dropdown items. The
Picker Item component must be placed as a child of the Picker.
If you need to allow your users to select multiple options, check out the Multi-Select Picker
|Component name||To alter the name of the component. The name is reflected in the Components tree. Defaults to Picker.|
|Icon Size||Size of the icon.|
|Left Icon Mode||Allows you to select the placement of the left icon, if one is selected. Inset displays the icon inside the border of the picker and outset displays the icon outside of the picker border.|
|Appearance||Appearance of the picker modal.|
Available values: sold or underlined.
|Placeholder||Placeholder text to display in the picker when the user has not made a selection.|
|Placeholder Text Color||Allows you to set the color of the placeholder text.|
|Left Icon Name||The name of the icon selected from the icon picker to be displayed on the left.|
|Assistive Text||Helper text to be displayed underneath the picker, useful for providing additional instructions.|
|Auto Dismiss Keyboard||Automatically dismiss keyboard when Picker is opened|
|Right Icon Name||The name of the icon selected from the icon picker to be displayed inset on the right.|
|Selected Icon Name||The icon to display on selected items. (dropdown mode only)|
|Selected Icon Color||The color of the icon displayed on selected items. (dropdown mode only)|
|Selected Icon Size||The size of the icon displayed on selected items. (dropdown mode only)|
|Dropdown Background Color||The background color of the dropdown container. (dropdown mode only)|
|Dropdown Border Color||The border color of the dropdown container. (dropdown mode only)|
|Dropdown Border Width||The border width of the dropdown container. (dropdown mode only)|
|Dropdown Border Radius||The border radius of the dropdown container. (dropdown mode only)|
|Options||Here you are able to pass an array of objects representing each option to display.|
The source of data can be static or remote (coming from an API).
For example, you can pass the options as
|Error||When enabled, an outline matching the theme's defined Error color will appear around the picker.|
Must be a boolean value: true or false.
|Disabled||Whether the picker should be disabled. Will prevent selection and show a greyed out state.|
|Label||The label of the picker which is displayed directly above the selected date.|
|Data Source||Initialize the stateful component with a value from a data source.|
|On Value Change||Runs when the value is changed|
Updated 2 months ago