Skip to content
This repository has been archived by the owner on Apr 11, 2018. It is now read-only.

telerik/kendo-react-buttons

Repository files navigation

Commitizen friendly npm version

This package is now deprecated and has been archived. For the current version of the Kendo UI Buttons for React, refer to the official website

Kendo UI Buttons for React

Overview

This repository contains the source code and documentation of the Kendo UI Buttons package for React.

Currently, the package includes the following components:

  • Button
  • ButtonGroup

Basic Usage

Kendo UI Button

The Button allows users to achieve a UI functionality by clicking on it.

    <div id="app"></div>
    class ButtonContainer extends React.Component {
        onClick = () => {
            //handle event
        }
        render() {
            return (
                <div>
                    <KendoReactButtons.Button onClick={this.onClick}>My Button</KendoReactButtons.Button>
                </div>
            );
        }
    }

    ReactDOM.render(
        <ButtonContainer />,
        document.getElementById('app')
    );    

For more examples and available configuration options, refer to the Button documentation.

Kendo UI ButtonGroup

The ButtonGroup is a group of more than one Buttons.

    <div id="app"></div>
    ReactDOM.render(
        <KendoReactButtons.ButtonGroup>
            <KendoReactButtons.Button>Button 1</KendoReactButtons.Button>
            <KendoReactButtons.Button>Button 2</KendoReactButtons.Button>
            <KendoReactButtons.Button>Button 3</KendoReactButtons.Button>
        </KendoReactButtons.ButtonGroup>,
        document.getElementById('app')
    );    

For more examples and available configuration options, refer to the ButtonGroup documentation.

Installation

The Buttons components are published as a public scoped NPM package in the Telerik organization in http://npmjs.org/.

Install it using NPM.

npm install --save @telerik/kendo-react-buttons;

Once installed, import the module.

// ES2015 module syntax
import * as KendoReactButtons from 'kendo-react-buttons';
// CommonJS format
var Button = require('kendo-react-buttons').Button;
var ButtonGroup = require('kendo-react-buttons').ButtonGroup;

To install the npm package, it is recommended that you use Node.js 5.0.0 or later versions.

Browser Support

The Buttons components work in all browsers supported by the React framework—Internet Explorer 9 and later versions.

Glossary

Below are explained the basic terms that Kendo UI suite for React applies.

Component

A Component refers to a React Component.

Package

A package contains one or more components, developed in a single repository and distributed in a single NPM package. For example, the Button and ButtonGroup components for React are part of the Buttons Package.