React Toolbar - Overview
The Toolbar is a UI component containing items that usually manage screen content. Those items can be plain text or UI components.
The following code adds a simple Toolbar to your page. Three items are plain text and one is a Button UI component.
App.js
- import React from 'react';
- import 'devextreme/dist/css/dx.common.css';
- import 'devextreme/dist/css/dx.light.css';
- import { Toolbar, Item } from 'devextreme-react/toolbar';
- const buttonOptions = {
- type: 'back',
- text: 'Back'
- };
- class App extends React.Component {
- render() {
- return (
- <Toolbar>
- <Item
- widget="dxButton"
- location="before"
- options={buttonOptions}
- />
- <Item
- text="Add"
- locateInMenu="always"
- />
- <Item
- text="Change"
- locateInMenu="always"
- />
- <Item
- text="Products"
- location="center"
- />
- </Toolbar>
- );
- }
- }
- export default App;
Note that field names in these data source items are conventional. This provides a default tile appearance, which can be customized later.
See Also
- Configure a Widget: Angular | Vue | React | jQuery | AngularJS | Knockout | ASP.NET MVC 5 | ASP.NET Core
- Toolbar - Specify Item Type
- Toolbar - Specify Item Location
- Toolbar - Customize Item Appearance
- Toolbar API Reference
Feel free to share topic-related thoughts here.
If you have technical questions, please create a support ticket in the DevExpress Support Center.
Thank you for the feedback!
If you have technical questions, please create a support ticket in the DevExpress Support Center.