KendoReact Dropdowns Overview

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

The KendoReact Dropdowns components are distributed through NPM under the kendo-react-dropdowns NPM package.

The Dropdowns package is part of KendoReact, a professionally built commercial UI library. To try out this package you need to sign up for a 30-day trial, which gives you access to the full KendoReact library.

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 @progress/kendo-react-intl
  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 16.8.2*
  • react-dom
  • @progress/kendo-react-intl