If set, a label will be generated using label property as the content.
- Type:
String
- Required: No
Used to add help text below the field.
- Type:
String
- Required: No
The value property of the currently selected option.
- Type:
Object
- Required: No
An array of objects containing the following properties:
-
label: (string) The label to be shown to the user.
-
value: (Object) The internal value compared against select and passed to onChange.
-
Type:
Array
-
Required: No
For more read gutenberg readme.
Example:
radio: {
type: 'string',
field: {
type: 'radio',
label: 'User type',
help: 'The type of the current user',
options: [
{
value: 'one',
label: 'Option One',
},
{
value: 'two',
label: 'Option Two',
},
],
},
default: 'one',
}
This will return selected value.
- Type:
string