Skip to main content

Radio Button

v.5.0.3

Installation​

yarn add @mercell/radio-button-react

Usage​

Using the Radio Button component is as simple as importing it like this.

import RadioButton from '@mercell/radio-button-react';
Live Editor
Result

Types, definitions, etc.​

RadioButtonProps
interface RadioButtonProps {
id: string;
labelProps?: JSX.IntrinsicElements['label'];
children?: ReactNode;
invalid?: boolean;
} & MutableRefObject<HTMLInput> & JSX.IntrinsicElements['input']
NameTypeDefaultRequiredDescription
idstring-yesUsed to group the label with the radio button input
labelPropsJSX.IntrinsicElements['label']-noCustom props for the label
childrenReactNode-yesThe label content
invalidbooleanfalsenoIf the label is invalid or not