Skip to content

row

row<TCollectionSlug, TFieldMeta, TFields>(props): RowField<TCollectionSlug, TFieldMeta, TFields>

Defined in: packages/core/src/fields/row/config.ts:35

Lays fields out on one admin-form row instead of each taking a full row. Legal in any fields record (a collection/global’s own, a group()’s, a group-shaped array()’s items, a blocks() block’s own). Its fields hoist to the parent level once getDataFields flattens this field. Row widths: if every child’s admin.width is a % value and they sum to 100 (±0.5), those widths are used (resolveRowWidths); otherwise every child gets an equal share. Rows stack below the sm breakpoint.

TCollectionSlug extends string = string

Types admin.condition’s data against that resource’s real document — same convention as tabs()/text().

TFieldMeta extends object = { }

TFields extends Record<string, AdminField> = Record<string, AdminField>

RowFieldInput<TCollectionSlug, TFieldMeta, TFields>

Row field configuration: fields and admin options.

RowField<TCollectionSlug, TFieldMeta, TFields>

The resolved RowField definition with defaults applied.

If fields is empty.

defineCollection({
fields: {
name: row({
fields: {
firstName: text({ admin: { width: "50%" } }),
lastName: text({ admin: { width: "50%" } }),
},
}),
},
})