react-dropdown-select vs react-select vs react-selectize
React Select Libraries
react-dropdown-selectreact-selectreact-selectizeSimilar Packages:

React Select Libraries

React select libraries provide developers with customizable dropdown components that enhance user experience by allowing users to select options from a list. These libraries offer various features such as multi-select, search functionality, and customizable styles, making them essential for building interactive forms and user interfaces in React applications. Each library has its own unique set of features and design philosophies, catering to different use cases and developer preferences.

Npm Package Weekly Downloads Trend

3 Years

Github Stars Ranking

Stat Detail

Package
Downloads
Stars
Size
Issues
Publish
License
react-dropdown-select0361187 kB3110 months agoMIT
react-select028,055726 kB4858 months agoMIT
react-selectize0702-1229 years ago-

Feature Comparison: react-dropdown-select vs react-select vs react-selectize

Customization

  • react-dropdown-select:

    react-dropdown-select offers basic customization options such as styling and theming, allowing developers to easily integrate the dropdown into their application's design without extensive configuration.

  • react-select:

    react-select provides extensive customization capabilities, including custom components for rendering options, multi-select support, and the ability to override default styles using CSS or styled-components, making it highly adaptable to various design requirements.

  • react-selectize:

    react-selectize allows for moderate customization, enabling developers to style the dropdown and its options. It also supports custom rendering for tags and options, providing flexibility without overwhelming complexity.

Features

  • react-dropdown-select:

    react-dropdown-select focuses on essential dropdown features like single selection and basic multi-selection, making it lightweight and easy to implement for simple use cases.

  • react-select:

    react-select is packed with features such as async loading of options, multi-select, searchable dropdowns, and keyboard navigation, making it suitable for complex forms and applications that require rich interactivity.

  • react-selectize:

    react-selectize supports multi-selection and tagging, allowing users to create new options on the fly. It strikes a balance between simplicity and functionality, making it user-friendly for various applications.

Performance

  • react-dropdown-select:

    react-dropdown-select is lightweight and optimized for performance, ensuring quick rendering and responsiveness, especially in simpler applications with fewer options.

  • react-select:

    react-select is designed to handle large datasets efficiently, with features like virtualized lists to improve performance when rendering many options, making it suitable for applications with extensive data.

  • react-selectize:

    react-selectize performs well for moderate datasets but may require optimization strategies for very large lists. It balances performance and usability, making it effective for most use cases.

Learning Curve

  • react-dropdown-select:

    react-dropdown-select has a gentle learning curve, making it easy for developers to implement and customize without extensive documentation or prior experience.

  • react-select:

    react-select has a steeper learning curve due to its extensive features and customization options, but it provides thorough documentation to help developers navigate its capabilities effectively.

  • react-selectize:

    react-selectize offers a moderate learning curve, providing straightforward usage while still allowing for some customization, making it accessible for developers with varying experience levels.

Community and Support

  • react-dropdown-select:

    react-dropdown-select has a smaller community compared to others, which may result in limited resources and community support, but it is straightforward enough for most developers to implement without extensive help.

  • react-select:

    react-select boasts a large community and extensive documentation, providing ample resources, examples, and community support, making it a reliable choice for developers seeking help and best practices.

  • react-selectize:

    react-selectize has a moderate community presence, with decent documentation and support available, but may not be as extensive as react-select, making it suitable for developers who prefer a simpler approach.

How to Choose: react-dropdown-select vs react-select vs react-selectize

  • react-dropdown-select:

    Choose react-dropdown-select if you need a lightweight solution with a focus on simplicity and ease of use. It is ideal for projects where you want a straightforward dropdown with essential features and minimal configuration.

  • react-select:

    Choose react-select if you require a highly customizable and feature-rich dropdown component. It supports advanced features like async options loading, multi-select, and custom styling, making it suitable for complex applications that need extensive functionality.

  • react-selectize:

    Choose react-selectize if you want a blend of simplicity and flexibility, with built-in support for tags and multiple selections. It is great for applications that need a straightforward interface while still allowing users to create new options on the fly.

README for react-dropdown-select

react-dropdown-select

Customisable dropdown select for react

Coverage Status Codacy Badge

Features

  • configurable via props
  • total custom components overrides for all internals via render prop callbacks (with access to internal props, state and methods)
  • stylable via css (or custom components)
  • portal support for rendering dropdown outside local DOM tree. e.g. in document.body
  • auto position
  • small bundle size

Installation

npm install --save react-dropdown-select

Web site

Web site, docs and demo

Motivation

react-select is very nice, but sometimes project requirements are beyond it's abilities

Usage

import:

import Select from "react-dropdown-select";

and use as:

const options = [
  {
    value: 1,
    label: 'Leanne Graham'
  },
  {
    value: 2,
    label: 'Ervin Howell'
  }
];

<Select options={options} onChange={(values) => this.setValues(values)} />;

If your options don't have value and label fields, include labelField and valueField in the props:

const options = [
  {
    id: 1,
    name: 'Leanne Graham'
  },
  {
    id: 2,
    name: 'Ervin Howell'
  }
];

<Select
  options={options}
  labelField="name"
  valueField="id"
  onChange={(values) => this.setValues(values)}
/>;

options and onChange are the minimum required props

Help and Contributions

How to help/contribute

  • fix issues, pull request are very welcome
  • write, improve docs
  • write tests (we use jest)
  • suggest features and improvements

Demo

Edit react-dropdown-select

API

Component props

PropTypeDefaultDescription
valuesarray[]Selected values
optionsarray[]Available options, (option with key disabled: true will be disabled)
keepOpenboolfalseIf true, dropdown will always stay open (good for debugging)
defaultMenuIsOpenboolfalseIf true, dropdown will be open by default
autoFocusboolfalseIf true, and searchable, dropdown will auto focus
clearOnBlurbooltrueIf true, and searchable, search value will be cleared on blur
clearOnSelectbooltrueIf true, and searchable, search value will be cleared upon value select/de-select
namestringnullIf set, input type hidden would be added in the component with the value of the name prop as name and select's values as value
requiredboolfalseIf set, input type hidden would be added in the component with required prop as true/false
patternstringnullIf set, input type hidden would be added in the component with pattern prop as regex
dropdownGapnumber5Gap between select element and dropdown
multiboolfalseIf true - will act as multi-select, if false - only one option will be selected at the time
placeholderstring"Select..."Placeholder shown where there are no selected values
addPlaceholderstring""Secondary placeholder on search field if any value selected
disabledboolfalseDisable select and all interactions
styleobject{}Style object to pass to select
classNamestringCSS class attribute to pass to select
loadingboolfalseLoading indicator
clearableboolfalseClear all indicator
searchablebooltrueIf true, select will have search input text
separatorboolfalseSeparator line between close all and dropdown handle
dropdownHandlebooltrueDropdown handle to open/close dropdown
dropdownHeightstring"300px"Minimum height of a dropdown
directionstring"ltr"direction of a dropdown "ltr", "rtl" or "auto"
searchBystringlabelSearch by object property in values
sortBystringnullSort by object property in values
labelFieldstring"label"Field in data to use for label
valueFieldstring"value"Field in data to use for value
colorstring"#0074D9"Base color to use in component, also can be overwritten via CSS
closeOnScrollboolfalseIf true, scrolling the page will close the dropdown
closeOnSelectboolfalseIf true, selecting option will close the dropdown
closeOnClickInputboolfalseIf true, clicking input will close the dropdown if you are not searching.
dropdownPositionstring"bottom"Available options are "auto", "top" and "bottom" defaults to "bottom". Auto will adjust itself according Select's position on the page
keepSelectedInListbooltrueIf false, selected item will not appear in a list
portalDOM elementfalseIf valid dom element specified - dropdown will break out to render inside the specified element
createboolfalseIf true, select will create value from search string and fire onCreateNew callback prop
backspaceDeletebooltrueIf true, backspace key will delete last value
createNewLabelstring"add {search}"If create set to true, this will be the label of the "add new" component. {search} will be replaced by search value
disabledLabelstring"disabled"Label shown on disabled field (after) the text
selectAllboolfalseAllow to select all
selectAllLabelstring"Select all"Label for "Select all"
clearAllLabelstring"Clear all"Label for "Clear all"
additionalPropsobjectnullAdditional props to pass to Select

Callback props

by using renderer props to override components some of the functionality will have to be handled manually with a help of internal props, states and methods exposed

PropTypeDefaultDescription
onChangefuncOn values change (user and internally triggered) callback, returns array of values objects
onSelectfuncOn values change (user triggered) callback, returns array of values objects
onDeselectfuncOn values change (user triggered) callback, returns array of values objects
onDropdownClosefuncFires upon dropdown close
onDropdownOpenfuncFires upon dropdown open
onCreateNewfuncFires upon creation of new item if create prop set to true
onClearAllfuncFires upon clearing all values (via custom renderers)
onSelectAllfuncFires upon selecting all values (via custom renderers)
onDropdownCloseRequestfuncundefinedFires upon dropdown closing state, stops the closing and provides own method close()
contentRendererfuncOverrides internal content component (the contents of the select component)
itemRendererfuncOverrides internal item in a dropdown
noDataRendererfuncOverrides internal "no data" (shown where search has no results)
optionRendererfuncOverrides internal option (the pillow with an "x") on the select content
inputRendererfuncOverrides internal input text
loadingRendererfuncOverrides internal loading
clearRendererfuncOverrides internal clear button
separatorRendererfuncOverrides internal separator
dropdownRendererfuncOverrides internal dropdown component
dropdownHandleRendererfuncOverrides internal dropdown handle
searchFnfuncundefinedOverrides internal search function
handleKeyDownFnfuncundefinedOverrides internal keyDown function

License

MIT