<div class="form-control mb-5 w-full max-w-xs">

    <label class="label cursor-pointer">
        <span class="label-text">
            Are you sure?</span> <input type="checkbox" class="toggle" checked="checked" value="" />

    </label>
</div>
@jrmc.form.control({ label: false, class: ['w-full', 'max-w-xs'] })
  @jrmc.form.label({ class: 'cursor-pointer', text: 'Are you sure?' })
    @!jrmc.form.toggle({ checked: true })
  @end
@end
  • Handle: @toggle-control
  • Preview:
  • Filesystem Path: fractal/components/03-form/04-toggle/05-toggle-control.edge

Toggle

Doc : daisyui toggle

Toggle is a checkbox that is styled to look like a switch button.

Class name Type
toggle Component For input checkbox
toggle-primary Modifier Adds primary color to toggle
toggle-secondary Modifier Adds secondary color to toggle
toggle-accent Modifier Adds accent color to toggle
toggle-lg Responsive Large toggle
toggle-md Responsive Medium toggle(default)
toggle-sm Responsive Small toggle
toggle-xs Responsive Extra small toggle

Specific params

Param name Type
checked boolean default check
disabled boolean