Skip to main content

Input

The Input component is a form control that allows users to enter text or data, with support for various styles, icons, and states.

Basic Usage​

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

const MyComponent = () => {
return <Input label="Username" inputSize="md" />;
};

Live Example​

Props​

NameTypeDescriptionRequiredDefault Value
labelstringLabel text for the input fieldNo-
inputSize"xs" | "sm" | "md" | "lg" | "xl"Size of the input fieldNo"sm"
iconLeftReact.ReactNodeIcon to display on the left side of the inputNo-
iconRightReact.ReactNodeIcon to display on the right side of the inputNo-
iconStyle'inset' | 'default' | 'outline'Style of the iconsNo'default'
disabledbooleanWhether the input is disabledNofalse
inputContainerStyleReact.CSSPropertiesCustom styles for the input containerNo-
inputLabelStyleReact.CSSPropertiesCustom styles for the input labelNo-
inputStyleReact.CSSPropertiesCustom styles for the input fieldNo-

Examples​

Different Sizes​

Small Size

Medium Size

Large Size

With Icons​

Left Icon

Right Icon

Both Icons

Icon Styles​

Default Icon Style

Inset Icon Style

Outline Icon Style

States​

Disabled Input

With Placeholder