RadioButtonGroup
Allows for automatic state management of radio buttons.
import { RadioButtonGroup } from '@ensdomains/thorin'
name | type | default | description |
---|---|---|---|
children | ReactElement<any, string | JSXElementConstructor<any>> & string | ReactElement<any, string | JSXElementConstructor<any>> & number | ReactElement<any, string | JSXElementConstructor<any>> & false | ReactElement<any, string | JSXElementConstructor<any>> & true | ReactElement<any, string | JSXElementConstructor<any>> & ReactElement<any, string | JSXElementConstructor<any>> | ReactElement<any, string | JSXElementConstructor<any>> & Iterable<ReactNode> | ReactElement<any, string | JSXElementConstructor<any>> & ReactPortal | ReactElement<any, string | JSXElementConstructor<any>>[] & string | ReactElement<any, string | JSXElementConstructor<any>>[] & number | ReactElement<any, string | JSXElementConstructor<any>>[] & false | ReactElement<any, string | JSXElementConstructor<any>>[] & true | ReactElement<any, string | JSXElementConstructor<any>>[] & ReactElement<any, string | JSXElementConstructor<any>> | ReactElement<any, string | JSXElementConstructor<any>>[] & Iterable<ReactNode> | ReactElement<any, string | JSXElementConstructor<any>>[] & ReactPortal | - | The children of the component that conform to the basic input attributes |
inline | boolean | false | Display the radio buttons in a row |
ref | null | string | (instance: HTMLDivElement | null) => void | RefObject<HTMLDivElement> | - | Allows getting a ref to the component instance.
Once the component unmounts, React will set `ref.current` to `null`
(or call the ref with `null` if you passed a callback ref).
@see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs} |
value | string | - | The value for the radio group |
onChange | ChangeEventHandler<HTMLInputElement> | - | The handler for the change event. |
onBlur | FocusEventHandler<HTMLInputElement> | - | The handler for the blur event. |