Skip to main content

Checkbox

The Checkbox component is a form control that allows users to select one or more options from a set of choices.

Basic Usage

import { Checkbox, ThemeProvider } from "@carton-org/react-neumorphism";

const MyComponent = () => {
return <Checkbox label="Accept terms and conditions" inputSize="md" />;
};

Live Example

Props

NameTypeDescriptionRequiredDefault Value
labelstringText label for the checkboxYes-
inputSize"xs" | "sm" | "md" | "lg" | "xl"Size of the checkboxNo'sm'
checkboxLabelStyleReact.CSSPropertiesCustom styles for the labelNo-

Examples

Different Sizes

Small Size

Medium Size

Large Size

Checkbox States

Unchecked

Checked

Disabled