obsidian/wiki/payloadcms/fields-row.md
2026-05-15 15:36:26 +01:00

2.3 KiB

title aliases tags sources created updated
Row Field
row-field
payload-row
payloadcms
fields
layout
admin-ui
raw/fields__row.md
2026-05-15 2026-05-15

Overview

The Row Field is a presentational-only layout field — it has no database column and stores no data. It arranges nested fields horizontally side by side in the Admin Panel.

Config Options

Option Required Description
type yes Must be "row"
fields yes Array of field configs to render side by side
admin no Admin options (excludes description, readOnly, hidden)
custom no Plugin extension data

Minimal Example

import type { Field } from 'payload'

export const MyRowField: Field = {
  type: 'row',
  fields: [
    // fields rendered side by side
  ],
}

Width Control

Use admin.width on nested fields to control proportions:

{
  type: 'row',
  fields: [
    {
      name: 'label',
      type: 'text',
      required: true,
      admin: { width: '50%' },
    },
    {
      name: 'value',
      type: 'text',
      required: true,
      admin: { width: '50%' },
    },
  ],
}

Key Takeaways

  • No DB column — purely presentational; does not appear in data schema or API responses
  • Horizontal layout — all fields in fields[] render in a single row
  • Width via nested fields — set admin.width on children (e.g. '50%', '33%') to control split
  • Combine with Group/Collapsible — Row works inside wiki/payloadcms/fields-group or wiki/payloadcms/fields-collapsible for complex layouts
  • Admin-only optionsdescription, readOnly, and hidden are not available on the Row itself; apply them to individual nested fields

Sources