EnInputRadioGroup
Preview
Props
| Name | Description | Default | Control |
|---|---|---|---|
| value | Used for a raw value passed into the input. string | "" | |
| options | Array of option objects with label and value keys. unknown[] | unknown | complex object |
| label | Sets the label for the group of radios. string | "" | |
| inline | Sets 'radio-inline' style, makes radios align horizontally. boolean | false | |
| horizontal | Sets the group to display horizontally. boolean | false | |
| labelClass | Sets the class used for the label column when using horizontal layout. string | "col-md-3" | |
| inputClass | Sets the class used for the input column when using horizontal layout. string | "col-md-9" | |
| showRequired | Displays asterisk (*) next to the group label. boolean | false | |
| pills | Styles the boolean | false | |
| styled | Sets an alternate style for the checkboxes. boolean | false | |
| btnStyle | Renders each radio with a button-like background, border, and hover/focus
styling. Implicitly enables boolean | false | |
| name | Sets name attribute for the input. Required for proper form handling. string | null | |
| id | Sets id attribute for input. If left blank, it will default to the string | null | |
| placeholder | Sets the placeholder value. string | null | |
| disabled | Sets the disabled attribute. boolean | null | |
| required | Sets the field to required. boolean | false | |
| typeCast | Used to specifically validate different types. string | "string" | |
| mode | Sets when and how often validation occurs. TODO: create docs for modes string | "eager" | |
| displayOnly | Displays the value of the field in a span element, instead of as an input. boolean | false | |
| rules | A pipe separated string of validation rules for the field. View validation rules string | "" | |
| renderInForm | Prevents a field from being rendered at all when used in the boolean | Function | true | |
| renderInTable | Prevents a field from generating a column/heading in the boolean | Function | true | |
| customMessages | Provide a custom error messages by rule. Should be an object with keys that match the rule name and value being a string of the message to display. Record<string, any> | null | |
| valueKey | Sets a different key to use to retrieve the value from the options passed to the component. string | "value" | |
| labelKey | Sets a different key to use to retrieve the label from the options passed to the component. string | "label" | |
| labelColors | Sets default colors for option labels in displayOnly mode unknown[] | unknown | |
| optionsKey | Sets a different key to use to retrieve the options from the option groups passed to the component. string | "options" |
Slots
display
No description
Variables
| Name | Type | Description |
|---|---|---|
selections | unknown | — |
Events
No events defined.
Methods
| Name | Description |
|---|---|
| focus | Focuses a radio input element in the group. |
Types
Option -
ObjectProperties available when using an input that accepts options.
| Name | Type | Description |
|---|---|---|
label | string | Display text for the option. Note: first letter is case insensitive meaning it will also try |
value | stringnumber | Value of the option that will be emitted when selected. Note: first letter is case insensitive meaning it will also try |
disabled | boolean | Sets the option to disabled so that it cannot be selected or deselected. |
labelColor | string | Overrides the default label color when using pills and display only, if supported. |
tooltip | string | Adds a tooltip next to the option if supported by the input (radio, checkbox, boolean). |
options | array | Array of Options when needing to use option groups. |