Input

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

    SourceTheme source@chakra-ui/input

The Input component is a multipart component. Read more about how to style multipart components in the style system docs.

This component has three parts: field, addon, and element. You can find more information in the source for the styles here.

Example#

The following theme would add a background with the value red.200 to the field, and remove the border of the addon.

import { extendTheme } from '@chakra-ui/react'
const theme = extendTheme({
components: {
Input: {
baseStyle: {
field: {
bg: 'red.200',
},
addon: {
border: 'none',
},
},
},
},
})
Edit this page on GitHub

Proudly made inNigeria by Segun Adebayo

Deployed by â–² Vercel