Toggle
The toggle captures a single boolean with a switch-style control. Use it for settings where the on
or off state is the important thing. Create one with Toggle::make().
Toggle::make('published', 'Published') ->helperText('Show this item publicly.')- autoFocus:false
- columnWidth:"md"
- conditions:null
- dependsOnAny:false
- dependsOnKeys:null
- disabled:false
- editablePrefill:false
- helperText:"Show this item publicly."
- hidden:false
- label:"Published"
- name:"published"
- prefillRefreshOn:null
- prefillResetOn:null
- readOnly:false
- required:false
- tabIndex:null
- tooltip:null
- value:null
Checkbox or toggle
Section titled “Checkbox or toggle”Use a Checkbox when the label is consent or agreement text. Use a toggle when the field enables or disables a setting.
Common options
Section titled “Common options”Toggle shares label, default value, required, disabled, read-only, and visibility options with
every field — see Fields. For validation and conditional behavior, see
Validation and Conditional fields.