Field Label
- Type:
string
- Required: No
Used to add help text below the field.
- Type:
String
- Required: No
Checked attribute of checkbox. Changes the accessibility text to "On/Off".
- Type:
bool
- Required: No
For more read gutenberg readme.
Example:
switch: {
type: 'string',
field: {
type: 'switch',
label: __( 'Form Toggle' ),
placement: 'inspector',
},
}
This will return on
or off
in output.
- Type:
string