react-dropdown vs react-dropdown-select vs react-native-picker-select vs react-native-select-dropdown vs react-select
Dropdown and Select Components for React and React Native
react-dropdownreact-dropdown-selectreact-native-picker-selectreact-native-select-dropdownreact-selectSimilar Packages:

Dropdown and Select Components for React and React Native

Dropdown and select components are essential UI elements in web and mobile applications, allowing users to choose from a list of options. These components can range from simple single-select dropdowns to more complex multi-select and searchable dropdowns. They are widely used in forms, filters, and anywhere user input is required. The choice of a dropdown or select component depends on the specific requirements of the project, such as the need for multi-selection, search functionality, customization, and whether the application is web-based or mobile. Libraries like react-select offer advanced features like async loading, custom styling, and accessibility support, making them suitable for more complex use cases. On the other hand, simpler components like react-dropdown may be more appropriate for lightweight applications where basic functionality is sufficient.

Npm Package Weekly Downloads Trend

3 Years

Github Stars Ranking

Stat Detail

Package
Downloads
Stars
Size
Issues
Publish
License
react-dropdown067366.9 kB612 days agoMIT
react-dropdown-select0366187 kB29a year agoMIT
react-native-picker-select01,84545.8 kB952 years agoMIT
react-native-select-dropdown036435.5 kB552 years agoMIT
react-select028,034726 kB489a year agoMIT

Feature Comparison: react-dropdown vs react-dropdown-select vs react-native-picker-select vs react-native-select-dropdown vs react-select

Customization

  • react-dropdown:

    react-dropdown allows for basic customization, including styling the dropdown and its items using CSS. However, it does not provide extensive APIs for deep customization.

  • react-dropdown-select:

    react-dropdown-select offers more customization options, including the ability to style the dropdown, select, and multi-select components. It also supports custom rendering for options and selected items, making it more flexible for designers.

  • react-native-picker-select:

    react-native-picker-select provides good customization capabilities, allowing developers to style the select input, placeholder, and individual options. It supports custom components for the select input and options, enabling more creative designs.

  • react-native-select-dropdown:

    react-native-select-dropdown offers basic customization for the dropdown button and its items. It allows for custom styling and the use of icons, but it is more limited compared to other libraries in terms of customizable features.

  • react-select:

    react-select is highly customizable, with support for custom styling, theming, and rendering of options, selected items, and the control. It provides a rich API for customization, making it suitable for applications that require a unique look and feel.

Multi-Select Support

  • react-dropdown:

    react-dropdown does not support multi-selection; it is designed for single selection only.

  • react-dropdown-select:

    react-dropdown-select supports both single and multi-selection, making it more versatile for forms that require selecting multiple items.

  • react-native-picker-select:

    react-native-picker-select is primarily a single-select component, but it can be extended to support multi-selection with additional implementation.

  • react-native-select-dropdown:

    react-native-select-dropdown supports single selection only, with no built-in multi-select functionality.

  • react-select:

    react-select supports both single and multi-selection out of the box, making it a great choice for applications that need flexible selection capabilities.

Accessibility

  • react-dropdown:

    react-dropdown provides basic accessibility features, but it may require additional work to ensure full compliance with accessibility standards.

  • react-dropdown-select:

    react-dropdown-select is designed with accessibility in mind, offering better support for screen readers and keyboard navigation compared to basic dropdowns.

  • react-native-picker-select:

    react-native-picker-select is built with accessibility in mind, providing support for screen readers and keyboard navigation on mobile devices.

  • react-native-select-dropdown:

    react-native-select-dropdown offers basic accessibility features, but it may not be fully optimized for screen readers and keyboard navigation.

  • react-select:

    react-select is highly accessible, with features like ARIA roles, keyboard navigation, and support for screen readers, making it one of the best choices for accessibility in dropdown components.

Code Example

  • react-dropdown:

    Simple Dropdown Example

    import React from 'react';
    import Dropdown from 'react-dropdown';
    import 'react-dropdown/style.css';
    
    const options = ['Option 1', 'Option 2', 'Option 3'];
    const defaultOption = options[0];
    
    const SimpleDropdown = () => {
      return (
        <Dropdown options={options} value={defaultOption} onChange={(option) => console.log(option)} />
      );
    };
    
    export default SimpleDropdown;
    
  • react-dropdown-select:

    Multi-Select Example

    import React from 'react';
    import { Select } from 'react-dropdown-select';
    
    const options = [
      { value: 1, label: 'Option 1' },
      { value: 2, label: 'Option 2' },
      { value: 3, label: 'Option 3' },
    ];
    
    const MultiSelect = () => {
      return <Select options={options} multi onChange={(values) => console.log(values)} />;
    };
    
    export default MultiSelect;
    
  • react-native-picker-select:

    Customizable Picker Example

    import React from 'react';
    import RNPickerSelect from 'react-native-picker-select';
    import { View, Text } from 'react-native';
    
    const CustomPicker = () => {
      return (
        <View>
          <Text>Select an option:</Text>
          <RNPickerSelect
            onValueChange={(value) => console.log(value)}
            items={[
              { label: 'Option 1', value: 'option1' },
              { label: 'Option 2', value: 'option2' },
              { label: 'Option 3', value: 'option3' },
            ]}
          />
        </View>
      );
    };
    
    export default CustomPicker;
    
  • react-native-select-dropdown:

    Simple Select Dropdown Example

    import React from 'react';
    import { View } from 'react-native';
    import SelectDropdown from 'react-native-select-dropdown';
    
    const SimpleDropdown = () => {
      const countries = ['USA', 'Canada', 'Mexico'];
    
      return (
        <View>
          <SelectDropdown
            data={countries}
            onSelect={(selectedItem) => console.log(selectedItem)}
            defaultButtonText="Select Country"
          />
        </View>
      );
    };
    
    export default SimpleDropdown;
    
  • react-select:

    Advanced Select Example

    import React from 'react';
    import Select from 'react-select';
    
    const options = [
      { value: 'chocolate', label: 'Chocolate' },
      { value: 'strawberry', label: 'Strawberry' },
      { value: 'vanilla', label: 'Vanilla' },
    ];
    
    const handleChange = (selectedOption) => {
      console.log(`Selected: ${selectedOption.label}`);
    };
    
    const AdvancedSelect = () => {
      return <Select options={options} onChange={handleChange} />;
    };
    
    export default AdvancedSelect;
    

How to Choose: react-dropdown vs react-dropdown-select vs react-native-picker-select vs react-native-select-dropdown vs react-select

  • react-dropdown:

    Choose react-dropdown if you need a simple, lightweight dropdown component for basic use cases. It is easy to implement and customize, making it ideal for projects that require straightforward functionality without the need for advanced features.

  • react-dropdown-select:

    Select react-dropdown-select if you require a more feature-rich dropdown that supports single and multi-selection, as well as tagging. It offers better customization and accessibility compared to basic dropdowns, making it suitable for forms that need more flexibility.

  • react-native-picker-select:

    Opt for react-native-picker-select if you are building a React Native application and need a customizable select component that works well on both iOS and Android. It provides a simple API and allows for custom styling and placeholder support, making it versatile for mobile apps.

  • react-native-select-dropdown:

    Choose react-native-select-dropdown if you need a lightweight and easy-to-use dropdown component for React Native. It supports single selection and offers basic customization, making it a good choice for mobile apps that require a simple dropdown without too many features.

  • react-select:

    Go with react-select if you need a highly customizable and feature-rich dropdown for React applications. It supports single and multi-selection, async options, and has excellent accessibility features. This library is ideal for complex forms and applications that require advanced functionality and styling capabilities.

README for react-dropdown

react-dropdown

A lightweight, accessible dropdown component for React 18 and 19.

react-dropdown is for the common case where a native <select> is too difficult to style, but a large select framework would be excessive. It supports single selection, option groups, controlled and uncontrolled state, custom rendering, keyboard navigation, and TypeScript without runtime dependencies.

Install

npm install react-dropdown

Import the component and its default styles:

import Dropdown, { type Option } from 'react-dropdown'
import 'react-dropdown/style.css'

const options = [
  { value: 'one', label: 'One' },
  { value: 'two', label: 'Two' },
  {
    type: 'group' as const,
    name: 'More',
    items: [
      { value: 'three', label: 'Three' },
      { value: 'four', label: 'Four', disabled: true },
    ],
  },
]

function Example() {
  const handleChange = (option: Option) => {
    console.log(option.value)
  }

  return (
    <Dropdown
      aria-label="Number"
      options={options}
      onChange={handleChange}
      placeholder="Select an option"
    />
  )
}

Primitive options are supported too:

<Dropdown options={['one', 'two', 'three']} defaultValue="one" />

String, number, and boolean values are supported. Labels may be any ReactNode.

Controlled state

Control the selected value, the open state, or both:

const [value, setValue] = useState<Option | null>(null)
const [open, setOpen] = useState(false)

<Dropdown
  options={options}
  value={value}
  onChange={setValue}
  open={open}
  onOpenChange={setOpen}
/>

Use null to clear a controlled value. Use defaultValue or defaultOpen for uncontrolled initial state.

Accessible labels

Give every dropdown an accessible name with a visible label:

<label id="country-label">Country</label>
<Dropdown aria-labelledby="country-label" options={countries} />

Or use aria-label when there is no visible label:

<Dropdown aria-label="Country" options={countries} />

The trigger implements a select-only combobox with a listbox popup. It supports:

  • Enter or Space to open and select.
  • ArrowDown and ArrowUp to open and move through options.
  • Home and End to move to the first or last enabled option.
  • Escape to close.
  • Tab to close and continue normal page navigation.
  • Disabled options, named groups, selected state, and active-descendant announcements.

Forms

Pass name to include the selected value in native form submission:

<Dropdown name="country" options={countries} defaultValue="au" />

The component renders a hidden input using the selected option value. Pass form to associate it with a form by ID.

Custom rendering

<Dropdown
  options={options}
  renderOption={(option, { active, selected }) => (
    <span>
      {selected ? '✓ ' : ''}
      {option.label}
      {active ? ' ←' : ''}
    </span>
  )}
  optionClassName={(_option, state) => (state.active ? 'my-active-option' : undefined)}
/>

Options may also define className and data:

const options = [
  {
    value: 'one',
    label: 'One',
    className: 'important-option',
    data: { analytics: 'option-one' },
  },
]

API

PropTypeDefaultPurpose
optionsDropdownEntry[]requiredPrimitive options, option objects, or groups.
valueOption | string | number | boolean | nullControlled selected value.
defaultValuesame as valuenullInitial uncontrolled value.
openbooleanControlled popup state.
defaultOpenbooleanfalseInitial uncontrolled popup state.
onChange(option: Option) => voidCalled after a user selects an option.
onOpenChange(open: boolean) => voidCalled when the popup requests an open-state change.
onFocus(open: boolean) => voidCalled when the trigger receives focus.
placeholderReactNode"Select..."Content shown without a selection.
disabledbooleanfalseDisables the trigger.
namestringAdds a hidden form input.
formstringAssociates the hidden input with a form ID.
idstringgeneratedSets the trigger ID and derived popup IDs.
tabIndexnumberbrowser defaultOverrides the trigger's tab order.
aria-labelstringGives the control an accessible name.
aria-labelledbystringReferences a visible label.
renderOption(option, state) => ReactNodeoption labelCustom option contents.
noOptionsContentReactNode"No options found"Empty-state contents.
arrowClosed / arrowOpenReactNodeCSS arrowCustom trigger arrows. Provide both.

The styling props are baseClassName, className, controlClassName, placeholderClassName, menuClassName, optionClassName, and arrowClassName.

The forwarded ref points to the trigger HTMLButtonElement.

Styling

The default stylesheet retains the familiar class names:

  • .Dropdown-root
  • .Dropdown-control
  • .Dropdown-placeholder
  • .Dropdown-arrow-wrapper and .Dropdown-arrow
  • .Dropdown-menu
  • .Dropdown-group and .Dropdown-title
  • .Dropdown-option
  • .Dropdown-noresults

State classes include .is-open, .is-selected, .is-active, and .is-disabled.

Set baseClassName to replace the Dropdown prefix when supplying all of your own styles.

Migrating from 1.x

Version 2 is a deliberate accessibility and packaging reset:

  • React 18 or 19 is required.
  • The package now ships ESM and CommonJS with an exports map.
  • The trigger is a focusable button with role="combobox"; CSS that assumes .Dropdown-control is a <div> may need adjustment.
  • onFocus now runs when the trigger actually receives focus.
  • onChange returns the complete normalized option, including className, disabled, and data when present.
  • value={null} clears a controlled selection. 0 and false are valid values.
  • The menu uses semantic <ul> and <li> elements. Prefer class selectors over element selectors in custom CSS.
  • optionClassName, renderOption, open, and onOpenChange replace common 1.x workarounds.
  • The old global .Dropdown-disabled class is now applied directly to the disabled control.

Development

npm install
npm run dev       # local example
npm test          # interaction tests
npm run typecheck
npm run build
npm run check     # all release checks

License

MIT