Input

Input component is a component that is used to get user input in a text field.

    SourceTheme source@chakra-ui/input

Props#

The Input component composes Box so you can pass all Box props, and React.InputHTMLAttributes.

colorScheme

Description

The visual color appearance of the component

Type
"whiteAlpha" | "blackAlpha" | "gray" | "red" | "orange" | "yellow" | "green" | "teal" | "blue" | "cyan" | "purple" | "pink" | "linkedin" | "facebook" | "messenger" | "whatsapp" | "twitter" | "telegram"

errorBorderColor

Description

The border color when the input is invalid. Use color keys in `theme.colors`

Type
string

focusBorderColor

Description

The border color when the input is focused. Use color keys in `theme.colors`

Type
string

htmlSize

Description

The native HTML size attribute to be passed to the input

Type
number

isDisabled

Description

If true, the form control will be disabled. This has 2 side effects: - The FormLabel will have `data-disabled` attribute - The form element (e.g, Input) will be disabled

Type
boolean
Default
false

isInvalid

Description

If true, the form control will be invalid. This has 2 side effects: - The FormLabel and FormErrorIcon will have `data-invalid` set to true - The form element (e.g, Input) will have `aria-invalid` set to true

Type
boolean
Default
false

isReadOnly

Description

If true, the form control will be readonly

Type
boolean
Default
false

isRequired

Description

If true, the form control will be required. This has 2 side effects: - The FormLabel will show a required indicator - The form element (e.g, Input) will have `aria-required` set to true

Type
boolean
Default
false

size

Description

The size of the Input

Type
"lg" | "md" | "sm" | "xs"
Default
md

variant

Description

The variant of the Input

Type
"outline" | "filled" | "flushed" | "unstyled"
Default
outline
Edit this page on GitHub

Proudly made inNigeria by Segun Adebayo

Deployed by â–² Vercel