Under active development — things may change.

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

PropTypeDefaultDescription
appearancesLinkAppearances[] | false['default', 'outline']Which appearance options to show on each link.
overridesPartial<ArrayField>{}Deep-merged into the generated array field.
localizedLabelbooleanfalsePasses localizedLabel: true to the inner link field.

What's Different

  • localizedLabel — Added prop to account for the localizedLabel option in the modified Link field.