Skip to content

Kirby 6.0.0

Gap

Layout field to create gaps in the field grid.

Field options

Name Type Default Description
default mixed null Default value for the field, which will be used when a page/file/user is created
translate bool true Should the field be translatable?
when array null Conditions when the field will be shown
width string '1/1' The width of the field in the field grid. Available widths: 1/1, 1/2, 1/3, 1/4, 2/3, 3/4

The gap field is a pure layout field that helps you organize your field grid visually by creating gaps in the field grid where necessary.

Examples:

fields:
  category:
    type: text
    width: 1/2
  gap:
    type: gap
    width: 1/4
  featured:
    type: toggle
    width: 1/4
    text:
      - "no"
      - "yes"

With conditional fields:

fields:
  hasHeadline:
    type: radio
    options:
      - yes
      - no
  headline:
    type: text
    width: 1/2
    when:
      hasHeadline: yes
  gap:
    type: gap
    width: 1/2
    when:
      hasHeadline: no
  text:
    type: textarea