Skip to content
This repository has been archived by the owner on Feb 10, 2020. It is now read-only.

Latest commit

 

History

History
45 lines (29 loc) · 724 Bytes

switch.md

File metadata and controls

45 lines (29 loc) · 724 Bytes

switch

image

label:

Field Label

  • Type: string
  • Required: No

help:

Used to add help text below the field.

  • Type: String
  • Required: No

checked:

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',
	},
}

Return

This will return on or off in output.

  • Type: string