obsidian/raw/_processed/fields__row.md
2026-05-15 15:36:26 +01:00

2.4 KiB

title label order desc keywords source
Row Field Row 150 With the Row field you can arrange fields next to each other in the Admin Panel to help you customize your Dashboard. row, fields, config, configuration, documentation, Content Management System, cms, headless, javascript, node, react, nextjs https://payloadcms.com/docs/fields/row

The Row Field is presentational-only and only affects the Admin Panel. By using it, you can arrange Fields next to each other horizontally.

To add a Row Field, set the type to row in your Field Config:

import type { Field } from 'payload'

export const MyRowField: Field = {
  // ...
  // highlight-start
  type: 'row',
  fields: [
    // ...
  ],
  // highlight-end
}

Config Options

Option Description
fields * Array of field types to nest within this Row.
admin Admin-specific configuration excluding description, readOnly, and hidden. More details.
custom Extension point for adding custom data (e.g. for plugins)

* An asterisk denotes that a property is required.

Example

import type { CollectionConfig } from 'payload'

export const ExampleCollection: CollectionConfig = {
  slug: 'example-collection',
  fields: [
    {
      type: 'row', // required
      fields: [
        // required
        {
          name: 'label',
          type: 'text',
          required: true,
          admin: {
            width: '50%',
          },
        },
        {
          name: 'value',
          type: 'text',
          required: true,
          admin: {
            width: '50%',
          },
        },
      ],
    },
  ],
}