Skip to content

RadioButton

Radio selection input type
import { RadioButton } from '@ensdomains/thorin'

Props
#

name
type
default
description
checked
boolean
-
If true, the radio button is selected.
defaultValue
string
-
The inital value of input element
description
ReactNode
-
Description text or react component.
disabled
boolean
-
If true, the input is unable to receive user input.
error
ReactNode
-
Error text or a react component.
hideLabel
boolean
-
If true, hides the label and secondary label.
id
string
-
The id attribute of input element.
inline
boolean
true
If true, moves the label and status messages to the right of the content.
label*
Required
ReactNode
-
A string or component that represents the input item. Label text or react component
labelPlacement
"top" | "bottom" | { error?: Placement | undefined; description?: Placement | undefined; }
-
Set the placement of the error and description. Does not affect inline mode.
labelRight
boolean
-
Have lavel appear on the right of the form element.
name
string
-
The name attribute for input elements.
tabIndex
number
-
The tabindex attribute for input elements.
value*
Required
string
-
The value attribute of input elements.
onChange
ChangeEventHandler<HTMLInputElement>
-
The handler for change events.
onFocus
FocusEventHandler<HTMLInputElement>
-
The handler for focus events.
onBlur
FocusEventHandler<HTMLInputElement>
-
The handler for blur events.
labelSecondary
ReactNode
-
Secondary text or react component
ref
Ref<HTMLInputElement>
-
-
required
boolean
-
Adds mark to label
width
any
-
A tokens space key value setting the width of the parent element.

Messages
#

Disabled
#

Edit on GitHub