Components
Columns

Columns

The Columns columns is a layout field, it can be used to create a better fields layout and can contain one or more fields or layout components like Group, Array, Tabs or Steps.

Fields are defined in fields key like below

Example

{
  "component": "columns",
  "name": "field_1",
  "columns": [
    {
      "name": "one",
      "size": 1
    },
    {
      "name": "two",
      "size": 1
    }
  ],
  "fields": {
    "one": [
      {
        "component": "input-text",
        "label": "Field 1",
        "name": "field_1",
        "react-rsuite5": {
          "fullWidth": true
        }
      }
    ],
    "two": [
      {
        "component": "rate",
        "label": "Field 2",
        "name": "field_2",
        "count": 5,
        "fractions": 1,
        "react-rsuite5": {
          "max": 5
        }
      }
    ]
  }
}
Loading...

LetsForm DSL

The above example can also be defined with LetsForm DSL

<LfColumns
  name="field_column"
>
  <LfColumn>
    <LfField
      component="input-text"
      label="Field 1"
      name="field_1"
      fullWidth={true}
    />
  </LfColumn>
  <LfColumn>
    <LfField
      component="rate"
      label="Field 2"
      name="field_2"
      count={5}
      fractions={1}
      max={5}
    />
  </LfColumn>
</LfColumns>

Reference

PropertyTypeDescription
componentstring
= "columns"
namestringThe name of the field and the key of the JSON
columns[column]Array of objects that defines the columns.
hiddenbooleanHides the layout component and all components inside it
fieldsObjectObject, each keys (name of column) is an array of fields for the column

Properties for column object

PropertyTypeDescription
namestringName or id of the column, the same name must be present as a key in the fields property
alignmentstringVertical alignment of the fields of the column. Values: "auto", "baseline", "center", "end", "flex-end", "flex-start", "inherit", "initial", "normal", "revert", "self-end", "self-start", "start", "stretch", "unset".
sizenumberFlex-like size of the column (a column with size 2 will occupy twice the space of a column with size 1)
Bootstrap
React Suite