Skip to main content

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

#NameData typeDefault valueValuesDescription
1modestringelevatedelevated, outlined, containedIt allow user to change mode of element
2list (required)arrayIt lets you to an array of the elements you want to display inside the dropdown. eg: [{lable: 'name', value: 'Ram'},]
3value (required)stringIt allows user to set the initial value of the Dropdown.
4setValue (required)funcIt allows user to select the value from the list.
5disabledboolfalseTo make drop down disable.

For more detail visit https://fateh999.github.io/react-native-paper-dropdown/#/