FormRadioGroup

Examples

Selected Value: ""

<FormRadioGroup
  @label="Grouped radio buttons"
  @value={{this.value}}
  @onChange={{this.setValue}}
  @errors={{this.validationErrors}}
  as |Radio|
>
  <Radio @value={{true}} @label="Yes" />
  <Radio @value={{false}} @label="No" />
  <Radio @value="maybe" @label="Maybe" />
</FormRadioGroup>

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

API

Arg Type Description Required Default
value unknown Yes -
containerClass string CSS classes to be added in the container element - -
errors string | string[] A list of errors or a single text describing the error - -
hasError boolean If has errors - -
hasSubmitted boolean If the form has been submitted, used to force displaying errors - -
hint string A help text to be displayed - -
isInline boolean If the Checkbox should be in one line - -
label string The group label - -
onChange (value: unknown, event: Event) => void Default callback added to the yielded FormRadio component, called when onchange is triggered - -
showError boolean Force displaying errors - -
size 'sm' | 'lg' The size - -