Home > @uniformdev/design-system > InputToggle
InputToggle variable
Component that creates a checkbox or radio input field
Signature:
InputToggle: React$1.ForwardRefExoticComponent<React$1.InputHTMLAttributes<HTMLInputElement> & {
label: React$1.ReactNode;
type: "radio" | "checkbox";
name: string;
showLabel?: boolean;
disabled?: boolean;
checked?: boolean;
caption?: string | JSX.Element;
errorMessage?: string;
warningMessage?: string;
fontWeight?: FontWeightProps;
testId?: string;
} & React$1.RefAttributes<HTMLInputElement>>
Example
<InputToggle label="Do you like ice cream?" type="checkbox" name="ice-cream" />