Link Group
A slightly modified version of linkGroup.ts from the Payload website template. The original can be found here.
Usage
TypeScript
1import { linkGroup } from '@/src/payload/fields/linkGroup';
2
3// Basic usage
4linkGroup()
5
6// With options
7linkGroup({
8 appearances: ['default', 'outline'],
9 localizedLabel: true,
10})Note: The import path above reflects the LayoutBlocks repo structure. Adjust it to match where you place the field file in your own project.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
appearances | LinkAppearances[] | false | ['default', 'outline'] | Which appearance options to show on each link. |
overrides | Partial<ArrayField> | {} | Deep-merged into the generated array field. |
localizedLabel | boolean | false | Passes localizedLabel: true to the inner link field. |
What's Different
localizedLabel— Added prop to account for thelocalizedLabeloption in the modified Link field.