Select

This is a select / dropdown input field. It will return the value of your selected option.

Select Field
{
  component: 'select',
  name: 'selectName',
  label: 'Select Field',
  description: 'A select field',
  options: [
    {
      label: 'Yes',
      value: 'yesValue'
    },
    {
      label: 'Maybe',
      value: 'maybeValue'
    },
    {
      label: 'No',
      value: 'noValue'
    },
  ],
  defaultValue: 'noValue',
}

Key

Type

Required

Description

component

string

yes

The name of the field component. (select)

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.

options

Array<Option | string>

no

An array of strings, ot an array of Option objects. { value: string, label: string }

defaultValue

string

no

This will be the value of your select values.

Last updated