Skip to main content

Input

Import

import { Input } from "@sparrowengg/twigs-react";

Usage

Result
Loading...
<Input placeholder="Enter your email" />

Variants

Input with icons

Result
Loading...
<Flex gap="4px" flexDirection="row">
  <Input leftIcon={<SearchIcon />} placeholder="Input with left icon" />
  <Input rightIcon={<SearchIcon />} placeholder="Input with right icon" />
  <Input
    leftIcon={<UserIcon />}
    rightIcon={<SearchIcon />}
    placeholder="Input with left and right icon"
  />
</Flex>

Props

PropertyDescriptionTypeDefault
variantstyle of inputdefault filleddefault
onChangefunction
sizeinput sizesm md lg xlmd
disabledbooleanfalse
leftIconAppend icon on the left side of inputJSX Element
rightIconAppend icon on the right side of inputJSX Element
cssCustom styles for inputobject
maxLengthMaximum allowed charactersnumber
errorBorderShow error border when there is errorbooleanfalse