BardField

The Bard field type used in Statamic.

Type Definition

Rich content editor that stores a string, an array of custom records, or null.

type 
BardField
<
T
extends
BardFieldSet
<{
type
: string }> =
BardFieldSet
<{
type
: string }>> =
(
T
extends
BardFieldSet
<infer
U
>
?
U
[]
: string) | null;
Union of custom Bard item types.
Must have a type property.

BardFieldSet

Structure for Bard set instances.

Will always require a type property.

type 
BardFieldSet
<
T
extends (
Record
<string, any> & {
type
: string }) = (
Record
<string, any> & {
type
: string })> = {
type
: string;
} &
T
;
T
Record<string, any> & { type: string }
Any properties you want to add to the item.
Must always have a type property.