Link

This link field returns an object with a text and url key that can be used for links, buttons, and call-to-actions. This component supports internal links to pages, products, and collections.

Link Field
{
  component: 'link',
  name: 'linkName',
  label: 'Link Field',
  description: 'A link field',
  defaultValue: {
    text: 'Buy now',
    url: '/pages/about-us'
  }
}

Key

Type

Required

Description

component

string

yes

The name of the field component. (link)

name

string

yes

The name of the field that will be accessible by the cms prop of the component.

label

string

no

A human-readable label for the field.

description

string

no

A short description of the setting scope.

defaultValue

object

no

The default value for the field. This will be an object that has a text and url key.

Last updated