-
Data Grid
- Overview
-
Data Binding
-
Paging and Scrolling
-
Editing
-
Grouping
-
Filtering and Sorting
- Focused Row
-
Row Drag & Drop
-
Selection
-
Columns
- State Persistence
-
Appearance
-
Templates
-
Data Summaries
-
Master-Detail
-
Export to PDF
-
Export to Excel
-
Adaptability
- Keyboard Navigation
-
Pivot Grid
- Overview
-
Data Binding
-
Field Chooser
-
Features
-
Export to Excel
-
Tree List
- Overview
-
Data Binding
- Sorting
- Paging
-
Editing
- Node Drag & Drop
- Focused Row
-
Selection
-
Filtering
-
Column Customization
- State Persistence
- Adaptability
- Keyboard Navigation
-
Scheduler
- Overview
-
Data Binding
-
Views
-
Features
- Virtual Scrolling
-
Grouping
-
Customization
- Adaptability
-
Html Editor
-
Chat
-
Diagram
- Overview
-
Data Binding
-
Featured Shapes
-
Custom Shapes
-
Document Capabilities
-
User Interaction
- UI Customization
- Adaptability
-
Charts
- Overview
-
Data Binding
-
Area Charts
-
Bar Charts
- Bullet Charts
-
Doughnut Charts
-
Financial Charts
-
Line Charts
-
Pie Charts
-
Point Charts
-
Polar and Radar Charts
-
Range Charts
-
Sparkline Charts
-
Tree Map
-
Funnel and Pyramid Charts
- Sankey Chart
-
Combinations
-
More Features
-
Export
-
Selection
-
Tooltips
-
Zooming
-
-
Gantt
- Overview
-
Data
-
UI Customization
- Strip Lines
- Export to PDF
- Sorting
-
Filtering
-
Gauges
- Overview
-
Data Binding
-
Bar Gauge
-
Circular Gauge
-
Linear Gauge
-
Navigation
- Overview
- Accordion
-
Menu
- Multi View
-
Drawer
-
Tab Panel
-
Tabs
-
Toolbar
- Pagination
-
Tree View
- Right-to-Left Support
-
Layout
-
Tile View
- Splitter
-
Gallery
- Scroll View
- Box
- Responsive Box
- Resizable
-
-
Editors
- Overview
- Autocomplete
-
Calendar
- Check Box
- Color Box
-
Date Box
-
Date Range Box
-
Drop Down Box
-
Number Box
-
Select Box
- Switch
-
Tag Box
- Text Area
- Text Box
- Validation
- Custom Text Editor Buttons
- Right-to-Left Support
- Editor Appearance Variants
-
Forms and Multi-Purpose
- Overview
- Button Group
- Field Set
-
Filter Builder
-
Form
- Radio Group
-
Range Selector
- Numeric Scale (Lightweight)
- Numeric Scale
- Date-Time Scale (Lightweight)
- Date-Time Scale
- Logarithmic Scale
- Discrete scale
- Custom Formatting
- Use Range Selection for Calculation
- Use Range Selection for Filtering
- Image on Background
- Chart on Background
- Customized Chart on Background
- Chart on Background with Series Template
- Range Slider
- Slider
-
Sortable
-
File Management
-
File Manager
- Overview
-
File System Types
-
Customization
-
File Uploader
-
-
Actions and Lists
- Overview
-
Action Sheet
-
Button
- Floating Action Button
- Drop Down Button
-
Context Menu
-
List
-
Lookup
-
Maps
- Overview
-
Map
-
Vector Map
-
Dialogs and Notifications
-
Localization
React Box
The Box component allows you to create layouts of any complexity. You can arrange multiple blocks (items) horizontally or vertically, specify relative or absolute block sizes, and nest layouts within each other.
If you have technical questions, please create a support ticket in the DevExpress Support Center.
import React from 'react';
import Box, { Item } from 'devextreme-react/box';
const App = () => (
<React.Fragment>
<Box direction="row" width="100%" height={75}>
<Item ratio={1}>
<div className="rect demo-dark">ratio = 1</div>
</Item>
<Item ratio={2}>
<div className="rect demo-light">ratio = 2</div>
</Item>
<Item ratio={1}>
<div className="rect demo-dark">ratio = 1</div>
</Item>
</Box>
<br />
<Box direction="row" width="100%" height={75}>
<Item ratio={0} baseSize={150}>
<div className="rect demo-dark">150px</div>
</Item>
<Item ratio={1}>
<Box
className="demo-light"
direction="row"
width="100%"
height={75}
align="center"
crossAlign="center"
>
<Item ratio={0} baseSize={50}>
<div className="small"></div>
</Item>
<Item ratio={0} baseSize={50}>
<div className="small"></div>
</Item>
<Item ratio={0} baseSize={50}>
<div className="small"></div>
</Item>
</Box>
</Item>
<Item ratio={0} baseSize="10%">
<div className="rect demo-dark">10%</div>
</Item>
</Box>
<br />
<Box direction="col" width="100%" height={250}>
<Item ratio={1}>
<div className="rect demo-dark header">Header</div>
</Item>
<Item ratio={2} baseSize={0}>
<Box direction="row" width="100%" height={125}>
<Item ratio={1}>
<div className="rect demo-dark">Left Bar</div>
</Item>
<Item ratio={1}>
<div className="rect demo-light">Content</div>
</Item>
<Item ratio={1}>
<div className="rect demo-dark">Right Bar</div>
</Item>
</Box>
</Item>
<Item ratio={1}>
<div className="rect demo-dark footer">Footer</div>
</Item>
</Box>
</React.Fragment>
);
export default App;
xxxxxxxxxx
xxxxxxxxxx
xxxxxxxxxx
xxxxxxxxxx
xxxxxxxxxx
xxxxxxxxxx
Set the Box's width and height properties to specify the layout's overall dimensions. To add blocks, use the items array, the dataSource property, or specify dxItems in the markup.
This demo shows how to use the Box component to create three different layouts.
The first Box sets direction to row
and thus arranges items horizontally. Items use the ratio property to set their width in relative units.
The second Box shows two additional features:
- Items now use the baseSize property to set their width in pixels or percent.
- The middle item contains a nested Box. The align and crossAlign properties make sure that the nested layout is centered within its container.
The third Box demonstrates a layout similar to a basic web page structure. The root layout sets direction to col
and arranges its items vertically. The nested layout is arranged horizontally.