Dropdown
The Dropdown is a reusable React component that provides an interactive dropdown list, allowing users to select a value from a list of predefined options.
How to use
import React from 'react';
import {Dropdown} from '@gyri/native-ui-components';
const MyDropdown = () => (
<DropDown
placeholder={'Select'}
list={options}
value={value}
setValue={setValue}
/>
);
export default MyDropdown;
Props
| # | Name | Data type | Default value | Values | Description |
|---|---|---|---|---|---|
| 1 | mode | string | elevated | elevated, outlined, contained | It allow user to change mode of element |
| 2 | list (required) | array | It lets you to an array of the elements you want to display inside the dropdown. eg: [{lable: 'name', value: 'Ram'},] | ||
| 3 | value (required) | string | It allows user to set the initial value of the Dropdown. | ||
| 4 | setValue (required) | func | It allows user to select the value from the list. | ||
| 5 | disabled | bool | false | To make drop down disable. |
For more detail visit https://fateh999.github.io/react-native-paper-dropdown/#/