DevExtreme React - Overview
The TileView widget contains a collection of tiles. Tiles can store much more information than ordinary buttons, that is why they are very popular in apps designed for touch devices.
The following code adds a primitive TileView to your page.
- import React from 'react';
- import 'devextreme/dist/css/dx.common.css';
- import 'devextreme/dist/css/dx.light.css';
- import { TileView } from 'devextreme-react/tile-view';
- const dataSource = [
- { text: 'Alabama' },
- { text: 'Alaska' },
- { text: 'Arizona' },
- // ...
- ];
- class App extends React.Component {
- render() {
- return (
- <TileView dataSource={dataSource}/>
- );
- }
- }
- 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.
By default, the widget is oriented horizontally, but you can orient it vertically using the direction option.
- import React from 'react';
- import 'devextreme/dist/css/dx.common.css';
- import 'devextreme/dist/css/dx.light.css';
- import { TileView } from 'devextreme-react/tile-view';
- class App extends React.Component {
- render() {
- return (
- <TileView direction="vertical"/>
- );
- }
- }
- export default App;
See Also
- Configure a Widget: Angular | Vue | React | jQuery | AngularJS | Knockout | ASP.NET MVC 5 | ASP.NET Core
- TileView - Specify the Size of Tiles
- TileView - Customize Tile Appearance
- TileView API Reference
If you have technical questions, please create a support ticket in the DevExpress Support Center.