Your search did not match any results.
Field Set

Field Set

Documentation

DevExtreme comes with the «dx-fieldset» CSS class that defines the appearance of an element displaying a list of field-value pairs. Each fieldset item is displayed within a separate field element, which has the «dx-field» class. The field element may include label and value elements defined by the «dx-field-label» and «dx-field-value» classes, respectively.

Copy to CodeSandBox
Apply
Reset
import React from 'react'; import TextBox from 'devextreme-react/text-box'; import TextArea from 'devextreme-react/text-area'; class App extends React.Component { render() { return ( <div className="form"> <div className="dx-fieldset"> <div className="dx-fieldset-header">Simple Field Set</div> <div className="dx-field"> <div className="dx-field-label">Full Name</div> <div className="dx-field-value-static">Kevin Carter</div> </div> <div className="dx-field"> <div className="dx-field-label">Position</div> <div className="dx-field-value-static">Shipping Manager</div> </div> </div> <div className="dx-fieldset"> <div className="dx-fieldset-header">Field Set with DevExtreme Widgets</div> <div className="dx-field"> <div className="dx-field-label">Address</div> <TextBox className="dx-field-value" value="424 N Main St." /> </div> <div className="dx-field"> <div className="dx-field-label">City</div> <TextBox className="dx-field-value" value="San Diego" /> </div> </div> <div className="dx-fieldset" id="notes-container"> <div className="dx-fieldset-header">Field Set with Custom Value Width</div> <div className="dx-field"> <div className="dx-field-label">Notes</div> <TextArea className="dx-field-value" height={80} value="Kevin is our hard-working shipping manager and has been helping that department work like clockwork for 18 months. When not in the office, he is usually on the basketball court playing pick-up games." /> </div> </div> </div> ); } } export default App;
import React from 'react'; import ReactDOM from 'react-dom'; import App from './App.js'; ReactDOM.render( <App />, document.getElementById('app') );
<!DOCTYPE html> <html> <head> <title>DevExtreme Demo</title> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0" /> <link rel="stylesheet" type="text/css" href="https://cdn3.devexpress.com/jslib/20.1.6/css/dx.common.css" /> <link rel="stylesheet" type="text/css" href="https://cdn3.devexpress.com/jslib/20.1.6/css/dx.light.css" /> <link rel="stylesheet" type="text/css" href="styles.css" /> <script src="https://unpkg.com/core-js@2.4.1/client/shim.min.js"></script> <script src="https://unpkg.com/systemjs@0.21.3/dist/system.js"></script> <script type="text/javascript" src="config.js"></script> <script type="text/javascript"> System.import('./index.js'); </script> </head> <body class="dx-viewport"> <div class="demo-container"> <div id="app"></div> </div> </body> </html>
.dx-fieldset:first-child > h4:first-child { margin-top: 0; } #notes-container > .dx-field > .dx-field-label { width: 20%; } #notes-container > .dx-field > .dx-field-value { width: 80%; }
System.config({ transpiler: 'plugin-babel', meta: { }, paths: { 'npm:': 'https://unpkg.com/' }, defaultExtension: 'js', map: { 'react': 'npm:react@16/umd/react.development.js', 'react-dom': 'npm:react-dom@16/umd/react-dom.development.js', 'prop-types': 'npm:prop-types/prop-types.js', 'devextreme': 'npm:devextreme@20.1', 'devextreme-react': 'npm:devextreme-react@20.1', 'jszip': 'npm:jszip@3.1.3/dist/jszip.min.js', 'quill': 'npm:quill@1.3.7/dist/quill.js', 'devexpress-diagram': 'npm:devexpress-diagram@1.0.9', 'devexpress-gantt': 'npm:devexpress-gantt@1.0.7', // SystemJS plugins 'plugin-babel': 'npm:systemjs-plugin-babel@0/plugin-babel.js', 'systemjs-babel-build': 'npm:systemjs-plugin-babel@0/systemjs-babel-browser.js' }, packages: { 'devextreme': { defaultExtension: 'js' }, 'devextreme-react': { main: 'index.js' }, 'devextreme/events/utils': { main: 'index' }, 'devextreme/events': { main: 'index' }, }, babelOptions: { sourceMaps: false, stage0: true, react: true } });