Design

The Radio button design has been kept minimal – understanding that the component will likely be used in a form with other components. The animation, however, has been built-in the add visual interest and to more importantly convey important feedback to the user.

Example

 
Your favourite type can have a value of 5

Usage

Radio buttons enable a user to make a single selection among a group of options. When using a Radio, it's recommended to list options in a logical order (alphabetically, numerically, etc.) and include at least 2 or more options. By default, it's recommended to have no Radio selected unless there is a most likely or recommended selection.

Radio

Radio buttons should be used in a RadioGroup. The Radio Group will provide a lot more functionality that should be used in a form. Radio is simply a radio button without any functionality that a form will need.

Props

NameDescriptionTypeRequiredDefault
valueshould contain the value assosciated with the radio buttonAnyfalse-
disabledwhen true, radio button will be disabledBooleanfalsefalse

Events

  • checked - emitted with the radio buttons value
  • blur - emitted when blur occurs

Slots

NameDescription
defaultcontent will be placed in a label

data-ref-ids

  • feather-radio - radio element that responds to click and key presses
  • feather-radio-label - label element

RadioGroup

Props

NameDescriptionTypeRequiredDefault
labellabel for the radio groupStringtrue-
modelValuecurrent value selected by the radio groupAnyfalse-
hinthint text to be displayed below the groupStringfalse-
errorerror text to be displayed below the groupStringfalse-
verticalwhen true will put radio buttons in a vertical layoutBooleanfalsefalse
schemaa schema for use in validationObjectfalse-

Events

  • update:modelValue - triggered with the selected radio buttons value
  • blur - triggers when radio button loses focus inside the group

Slots

  • default - Radios to be used in group

data-ref-ids

  • feather-radio-group - group element that responds to key presses

Attributes

Specifying an class or data-ref-id attribute will cause them to be applied to the component root container div. All other attributes are inherited to the input where applicable. Some will be ignored if they conflict with attributes used for accessibility.