FormCheckbox

Examples

‚Äč

Selected Value: "false"

<FormCheckbox
  name="isChecked"
  @label="Checkbox"
  @checked={{this.value}}
  @onChange={{this.setValue}}
/>

<p class="mt-4">Selected Value: "{{this.value}}"</p>

API

Arg Type Description Required Default
checked boolean If the checkbox is checked. You must also pass `onChange` to update its value. Yes -
onChange (value: boolean, event: Event) => void Callback when onchange is triggered Yes -
containerClass string CSS classes to be added in the container element - -
hint string A help text to be displayed - -
label string The input field label - -
name string The name of the checkbox - -
size 'sm' | 'lg' The size - -