Demos
Composition field
You may adjust the widths to your needs.
Code Editor
<Field.Composition info="Info at the bottom" width="large"> <Field.String label="Field A with a long label" width="medium" /> <Field.String label="Field B" width="stretch" /> </Field.Composition>
Composition with a label
Code Editor
<Field.Composition label="A legend for the fieldset" width="large"> <Field.String label="Field label" width="stretch" /> <Field.Number width="small" placeholder="0000" /> </Field.Composition>
Composition of multiple statuses
Code Editor
<Field.Composition label="Label text" info="FieldBlock info"> <Field.String width="small" minLength={3} warning="Warning message" /> <Field.Number minimum={10} info="Field info" /> </Field.Composition>
Composition field with error
Code Editor
<Field.Composition error={new Error('Error at the bottom')} width="large"> <Field.String label="Field A" width="stretch" /> <Field.String label="Field B with a long label that wraps" width="medium" /> </Field.Composition>
Alignment
Code Editor
<Field.Composition label="Label text" align="center"> <Field.Number width="small" defaultValue={0} showStepControls /> <Field.Boolean /> </Field.Composition>