Radio Button
<gstock-radio-button>
|
GstockRadioButton
API
Properties
| Name | Description | Reflects | Type | Default |
|---|---|---|---|---|
disabled
|
Disables the radio button. |
|
boolean
|
false
|
size
|
The radio button’s size. When used inside a radio group, the size will be determined by the radio group’s size so this attribute can typically be omitted. |
|
'small' | 'medium' | 'large'
|
'medium'
|
value
|
The radio’s value. When selected, the radio group will receive this value. |
string
|
-
|
|
updateComplete
|
A read-only promise that resolves when the component has finished updating. |
Learn more about attributes and properties .
Events
| Name | React Event | Description | Event Detail |
|---|---|---|---|
gstock-blur-event
|
onGstockBlurEvent
|
Emitted when the button loses focus. | - |
gstock-focus-event
|
onGstockFocusEvent
|
Emitted when the button gains focus. | - |
Learn more about events .
Slots
| Name | Description |
|---|---|
default
|
The radio button’s label. |
prefix
|
A presentational prefix icon or similar element. |
suffix
|
A presentational suffix icon or similar element. |
Learn more about slots .
Methods
| Name | Description |
|---|---|
focus(
|
Sets focus on the radio button. |
blur( )
|
Removes focus from the radio button. |
Learn more about methods .
CSS Parts
| Name | Description |
|---|---|
base
|
The component’s base wrapper. |
button
|
The internal <button> element. |
button--checked
|
The internal button element when the radio button is checked. |
prefix
|
The container that wraps the prefix. |
label
|
The container that wraps the radio button’s label. |
suffix
|
The container that wraps the suffix. |
Learn more about CSS parts .