Files
payload/docs/fields/row.mdx
Teun Mooij 023719d775 feat: configuration extension points
* added custom config extension points

* Added custom field to documentation

* fix deeprequired issue
2023-04-18 15:28:42 -04:00

57 lines
1.5 KiB
Plaintext

---
title: Row Field
label: Row
order: 150
desc: With the Row field you can arrange fields next to each other in the Admin Panel to help you customize your Dashboard.
keywords: row, fields, config, configuration, documentation, Content Management System, cms, headless, javascript, node, react, express
---
<Banner >
The Row field is presentational-only and only affects the Admin panel. By using it, you can arrange fields next to each other horizontally.
</Banner>
### Config
| Option | Description |
| ---------------- | ----------- |
| **`fields`** * | Array of field types to nest within this Row. |
| **`admin`** | Admin-specific configuration excluding `description`, `readOnly`, and `hidden`. See the [default field admin config](/docs/fields/overview#admin-config) for more details. |
| **`custom`** | Extension point for adding custom data (e.g. for plugins) |
*\* An asterisk denotes that a property is required.*
### Example
`collections/ExampleCollection.ts`
```ts
import { CollectionConfig } from 'payload/types';
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%',
},
},
],
}
]
}
```