Inner Layouts
Inner layouts define how a widget’s children are arranged. They are typically used as container components.
| Layout | Purpose |
|---|---|
| LabelsLeftLayout | Horizontal form layout with labels on the left |
| LabelsTopLayout | Form layout with labels above inputs |
| FirstVisibleChildLayout | Shows only the first visible child |
| UseParentLayout | Delegates layout to the parent container |
Default Behavior (No Layout)
When no layout is specified, children render in the order they are defined. For form fields, this means the label appears inline before the input:
<div>
First some text.
<TextField value={m.text} label="Label 1" />
<Checkbox value={m.check} label="Label 2">
Checkbox
</Checkbox>
</div> First some text.
This default behavior doesn’t work well for structured forms. Use a layout component to arrange form fields properly:
<LabelsLeftLayout>
First some text.
<TextField value={m.text} label="Label 1" />
<Checkbox value={m.check} label="Label 2">
Checkbox
</Checkbox>
</LabelsLeftLayout> | First some text. | |