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.
Type Parameters
Section titled “Type Parameters”TCollectionSlug
Section titled “TCollectionSlug”TCollectionSlug extends string = string
Types admin.condition’s data against that
resource’s real document — same convention as tabs()/text().
TFieldMeta
Section titled “TFieldMeta”TFieldMeta extends object = { }
TFields
Section titled “TFields”TFields extends Record<string, AdminField> = Record<string, AdminField>
Parameters
Section titled “Parameters”RowFieldInput<TCollectionSlug, TFieldMeta, TFields>
Row field configuration: fields and admin options.
Returns
Section titled “Returns”RowField<TCollectionSlug, TFieldMeta, TFields>
The resolved RowField definition with defaults applied.
Throws
Section titled “Throws”If fields is empty.
Example
Section titled “Example”defineCollection({ fields: { name: row({ fields: { firstName: text({ admin: { width: "50%" } }), lastName: text({ admin: { width: "50%" } }), }, }), },})