Checkbox
A control that allows the user to toggle between checked and not checked.
Usage
Example
Checked
Components
Component | Built using | Source |
---|---|---|
Checkbox | Phlex |
A control that allows the user to toggle between checked and not checked.
div(class: 'flex items-center space-x-3') do Checkbox(id: 'terms') label(for: 'terms', class: 'text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70') { "Accept terms and conditions" } end
You agree to our Terms of Service and Privacy Policy.
div(class: "items-top flex space-x-3") do Checkbox(id: 'terms1', checked: true) div(class: "grid gap-1.5 leading-none") do label( for: "terms1", class: "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70" ) { " Accept terms and conditions " } p(class: "text-sm text-muted-foreground") { " You agree to our Terms of Service and Privacy Policy." } end end
Component | Built using | Source |
---|---|---|
Checkbox | Phlex |