npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

react-native-dropdown-with-search-and-checkbox

v1.1.2

Published

A React Native dropdown with search and checkbox functionality

Readme

react-native-dropdown-with-search-and-checkbox

A customizable React Native dropdown component featuring search functionality and checkbox selection (single & multiple). Ideal for creating dynamic, user-friendly dropdowns in your mobile applications.


Features

  • 🔍 Searchable Dropdown: Easily search through the options.
  • ☑️ Checkbox Selection: Supports both single and multiple selection.
  • 📱 Modal-based Dropdown: Beautiful modal dropdown UI.
  • 🎨 Customizable Styles: Extensive styling options for every aspect of the dropdown.

Installation

Install the package using npm:

npm install react-native-dropdown-with-search-and-checkbox

Additionally, make sure to install the required dependencies:

npm install react-native-elements react-native-vector-icons

For React Native versions below 0.60, link react-native-vector-icons manually:

npx react-native link react-native-vector-icons

Usage

To use the dropdown in your React Native app, follow the example below:

Basic Example

import React, { useState } from 'react';
import { View, Text } from 'react-native';
import { DropdownSearch } from 'react-native-dropdown-with-search-and-checkbox';

const App = () => {
  const [selectedItems, setSelectedItems] = useState([]);

  const data = [
    { label: 'Apple', value: 'apple' },
    { label: 'Banana', value: 'banana' },
    { label: 'Mango', value: 'mango' },
  ];

  return (
    <View style={{ flex: 1, justifyContent: 'center' }}>
      <Text>Select Fruits</Text>
      <DropdownSearch
        label="Fruits"
        data={data}
        placeholder="Select fruits"
        multiSelect={true}
        showCheckbox="multiple"
        showFilter={true}
        onSelect={(items) => setSelectedItems(items)}
      />
    </View>
  );
};

export default App;

Example 1 Search with Single Select :

Screenshot

Dropdown Screenshot

Dropdown Screenshot

Dropdown Screenshot


Props

| Prop | Type | Default | Description | |---------------------|-----------|---------------|-------------| | data | array | [] | List of items to display in the dropdown | | onSelect | func | required | Callback function to handle selected items | | label | string | '' | Label displayed above the dropdown | | placeholder | string | 'Select...' | Placeholder text displayed when no selection is made | | labelKey | string | 'label' | The key name to access the label in each data item | | valueKey | string | 'value' | The key name to access the value in each data item | | multiSelect | bool | false | Enables or disables multiple selection | | showCheckbox | string | null | Set to 'multiple' to display checkboxes for multiple selection | | showFilter | bool | false | Shows the filter icon and search input | | saveButtonText | string | 'Save' | Text for the Save button when multiple items are selected | | placeholderStyle | object | {} | Custom styling for the placeholder text | | downArrowStyle | object | {} | Custom styling for the dropdown arrow icon | | filterIconStyle | object | {} | Custom styling for the filter icon | | searchInputStyle | object | {} | Custom styling for the search input | | dropdownButtonStyle | object | {} | Custom styling for the dropdown button | | checkboxStyle | object | {} | Custom styling for the checkbox | | checkboxColor | string | '#007bff' | Color for the checkbox |


Example 2 Search with Multiple Select :

Screenshot

Dropdown Screenshot

Dropdown Screenshot

Dropdown Screenshot

Example with Multiple Selection

import React, { useState } from 'react';
import { View, Text } from 'react-native';
import { DropdownSearch } from 'react-native-dropdown-with-search-and-checkbox';

const MultiSelectExample = () => {
  const [selectedItems, setSelectedItems] = useState([]);

  const data = [
    { label: 'Apple', value: 'apple' },
    { label: 'Banana', value: 'banana' },
    { label: 'Mango', value: 'mango' },
  ];

  return (
    <View style={{ flex: 1, justifyContent: 'center' }}>
      <Text>Multi-select Fruits</Text>
      <DropdownSearch
        label="Fruits"
        data={data}
        placeholder="Select fruits"
        multiSelect={true}
        showCheckbox="multiple"
        onSelect={(items) => setSelectedItems(items)}
      />
      <Text>Selected: {selectedItems.map(item => item.label).join(', ')}</Text>
    </View>
  );
};

export default MultiSelectExample;

Example 3 Search with Multi Select :

Screenshot

Dropdown Screenshot

License

MIT


Author

Bhumit Dara