DropDowns Overview

The DropDowns allow you to choose from a predefined list of options.

Basic Usage

The following example demonstrates the AutoComplete, ComboBox, DropDownList, and MultiSelect components in action.

import React from 'react';
import ReactDOM from 'react-dom';

import { AutoComplete, ComboBox, DropDownList, MultiSelect } from '@progress/kendo-react-dropdowns';

class AppComponent extends React.Component {
    sports = [ "Baseball", "Basketball", "Cricket", "Field Hockey", "Football", "Table Tennis", "Tennis", "Volleyball" ];

    render() {
        return (
            <div className="example-wrapper" style={{ minHeight: '400px' }}>
                <div className="col-xs-12 col-sm-7 example-col">
                    <p>AutoComplete</p>
                    <AutoComplete data={this.sports} placeholder="Your favorite sport" />
                </div>
                <div className="col-xs-12 col-sm-7 example-col">
                    <p>ComboBox</p>
                    <ComboBox data={this.sports} defaultValue="Basketball" />
                </div>
                <div className="col-xs-12 col-sm-7 example-col">
                    <p>DropDownList</p>
                    <DropDownList data={this.sports} defaultValue="Basketball" />
                </div>
                <div className="col-xs-12 col-sm-7 example-col">
                    <p>MultiSelect</p>
                    <MultiSelect data={this.sports} defaultValue={[ "Basketball", "Cricket" ]} />
                </div>
            </div>
        );
    }
}

ReactDOM.render(
    <AppComponent />,
    document.querySelector('my-app')
);

Installation

  1. Download and install the package. Use Node.js v5.0.0 or later.

    npm install --save @progress/kendo-react-dropdowns
  2. Once installed, import the package module.

    // ES2015 module syntax
    import { AutoComplete, ComboBox, DropDownList, MultiSelect } from '@progress/kendo-react-dropdowns';
    // CommonJS format
    const { AutoComplete, ComboBox, DropDownList, MultiSelect } = require('@progress/kendo-react-dropdowns');
  3. You are required to install one of the Kendo UI themes to style your components. For more information on how to add the styles, refer to the article on getting started.

Dependencies

The DropDowns package requires you to install the following peer dependencies in your application:

  • react
  • react-dom

In this article