Skip to content

Demos

Composition field

You may adjust the widths to your needs.

Info at the bottom
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

A legend for the fieldset
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

Label text
FieldBlock info
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

Error at the bottom
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

Label text
Code Editor
<Field.Composition label="Label text" align="center">
  <Field.Number width="small" defaultValue={0} showStepControls />
  <Field.Boolean />
</Field.Composition>