Skip to main content

Layout components

The next generation content form includes two ways of specifying the layout of a form: tabs and grids. These features allow you to specify how properties in the form are laid out and to make the form easier to use by grouping related properties together.

Try the interactive examples on this page

Edit the schemas to see how your changes affect the fields they generate.

Grids
Link copied!

The grid component allows you to group related properties in columns and specify how these columns should be displayed.

Parameters
Link copied!

ParamTypeDescription
namestringgrid
numColumnsintegerThe number of columns in each row.
columnsarrayThe span of each group of columns and the properties it contains

The span parameter specifies how many columns each column group takes up. Each item in the columns arrays includes span and a pointers array containing the properties contained within it.

Grid example
Link copied!

The example schema below groups image properties together in a grid divided into 12 columns, with each property spanning 6 columns (half the available space). In the form, Image Link and Image SVG are aligned in one section of the grid, while Image Alt Text, Image URL, and Image Link Target are grouped on the other.

    Try the example

    Try changing the grid groupings, or move properties, to see how the form layout changes.

    Tabs
    Link copied!

    The tabs component allows you to organise your form so it can be navigated using tabs. You may choose to add advanced options in a separate tab and keep the most commonly used properties in the main tab, for example.

    Specify the tab labels, the default tab and the properties that will be included in each tab.

    You can find a more advanced tabs example, with vertical tabs, in the schema examples.

    Parameters
    Link copied!

    ParameterDescription
    nametabs
    defaultTabThe name of the tab that will be selected initially
    orientationHow the tabs are displayed. horizontal (default) or vertical
    variantdefault or outline. Should an outline be displayed around the selected tab.
    growtrue or false (default). Should the tabs expand to fit the size of the form.
    itemsAn array of tabs.
    For each entry in the items array there is a label and a pointers array that contains the property names in JSON pointer format. See example.

    Tabs example
    Link copied!

    In the simple schema shown below, there are two tabs: image and video, each containing a property for the media itself and a string field.

      Try the example

      Try adding a new tab or move properties between tabs to see how the form layout changes.

      Divider
      Link copied!

      A divider is a line of variable width, with an optional label. It’s particularly useful for labelling groups of properties to create notional sections that don’t impact output.

      Parameters
      Link copied!

      ParamDescription
      namedivider
      labelThe label shown on the divider
      labelPositionThe divider label alignment. left, right or center (default).
      sizeThe divider line size. xs (default), sm, md, lg, xl or xxl.
      Note that the size of the label will not be changed
      variantThe divider line style. dotted or dashed. A solid line will be used by default if variant is not specified

      Divider example
      Link copied!

      In the example below, the numberDivider property includes a label and has a line size set to medium. Dividers are used for form layout only and are not included in the content item’s JSON output.

      Here, the divider acts as a heading for a group of number properties (taken from the number schema example).

        Try the example

        Try adding another divider to see how the form adjusts.

        Field set
        Link copied!

        The field set allows you to group items together, display them with a text label, and choose a style variant to differentiate these items from other fields in the form.

        Parameters
        Link copied!

        ParamDescription
        namefieldset
        variantThe style of field set box.
        default a round cornered bounding box with no fill. (Used if no variant is specified)
        filled filled with the background color and no bounding box line.
        unstyled just the title, no bounding box and no fill.
        radiusThe radius of the bounding box (if shown) xs sm, md, lg, xl or xxl.

        Field set example
        Link copied!

        The following schema example shows 3 field set objects with different style variants.

        • fieldset-Tabs is an object that contains tabs and uses the default style.
        • fieldset-validation shows the fill variant with the background of the object filled in.
        • dateTimeFields shows a field set object with no styling and just the title.

        On the form, the "Media configuration" group of fields uses the default style, while the "Fields with validation" field set uses the fill variant to make it stand out from the rest of the form.

          Try the example

          Try changing the radius parameter to see how it affects the appearance of the form.

          Field set grid
          Link copied!

          The field set grid component combines the features of Grids and Field sets to group related fields in a grid with a title and customizable style. This helps differentiate the fields from the rest of the form and improves the content entry process for users.

          Parameters
          Link copied!

          ParamDescription
          namefieldset-grid
          numColumnsThe number of columns in each row.
          columnsThe span of each group of columns and the properties it contains
          variantThe style of field set box.
          default a round cornered bounding box with no fill. (Used if no variant is specified)
          filled filled with the background color and no bounding box line.

          The span parameter specifies how many columns each column group takes up. Each item in the columns arrays includes span and a pointers array containing the properties contained within it.

          Field set grid example
          Link copied!

          An example field set grid schema example is shown below. This uses the same example as the Grid example with image properties grouped together in a grid divided into 12 columns and each property using half the available space. The field set grid object is configured to fill the background, as well as showing the object title.

          The form shows how the field set grid object uses the fill style.

            Try the example

            Try adjusting the variant parameter to default to see how the form changes.