Checkbox
NB! The component will be deprecated soon.
Please check out our new Checkbox component.
Checkbox
  
  State
  
@user_changeset = #Ecto.Changeset<
  action: nil,
  changes: %{agrees_to_terms_of_service: false},
  errors: [
    agrees_to_terms_of_service: {"please accept terms of service",
     [validation: :inclusion, enum: [true]]}
  ],
  data: #MoonWeb.Pages.Tutorials.AddDataUsingForm.User<>,
  valid?: false
>
  No Label
Disabled
ReadOnly
    Checkbox props
  
  
  | Name | Type | Required | Default | Description | 
|---|---|---|---|---|
| checked | boolean | No | false | Preset value for checkbox state | 
| disabled | boolean | No | false | Checkbox disabled state | 
| readonly | boolean | No | false | Checkbox isn't disabled but its value can't be changed | 
| field | atom | Yes | - | Field name for the inner input form control | 
| #slot | element | Yes | - | Label for the control |