This repository contains the source code and documentation of the Kendo UI Dialog package for React.
For more information on upcoming Dialog features, refer to the Roadmap.
The Dialog asks users for input, blocking other parts of the page.
<div id="app"></div>
class App extends React.Component {
constructor(props) {
super(props);
this.state = { welcomeShown: false };
this.closeHandler = this.onClose.bind(this);
}
onClose() {
this.setState({ welcomeShown: true });
}
render() {
const dialog = (
<Dialog
title="You can do anything."
actions={[ { text: "OK" } ]}
onClose={this.closeHandler}
>
Welcome to Zombo.com.
</Dialog>
);
return (
<section>
{ !this.state.welcomeShown ? dialog : null }
<p>Anything at all.</p>
</section>
);
}
};
ReactDOM.render(
<App />,
document.getElementById('app')
);
For more examples and available configuration options, refer to the Dialog documentation.
The Dialog is 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-dialog;
Once installed, import the module.
// ES2015 module syntax
import { Dialog } from 'kendo-react-dialog';
// CommonJS format
var Dialog = require('kendo-react-dialog').Dialog;
To install the npm package, it is recommended that you use Node.js 5.0.0 or later versions.
The Dialog works in all browsers supported by the React framework—Internet Explorer 9 and later versions.
Below are explained the basic terms that Kendo UI suite for React applies.
A Component refers to a React Component.
A package contains one or more components, developed in a single repository and distributed in a single NPM package.