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"

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

Proudly made inNigeria by Segun Adebayo

Deployed by â–² Vercel