Color Schemes for Input are not implemented in the default theme. You can extend the theme to implement them.
Input
Input component is a component that is used to get user input in a text field.
Props#
The Input component composes Box so you can
pass all Box props, and React.InputHTMLAttributes.
colorScheme
colorScheme(string & {})errorBorderColor
errorBorderColorThe border color when the input is invalid. Use color keys in `theme.colors` @example errorBorderColor = "red.500"
stringfocusBorderColor
focusBorderColorThe border color when the input is focused. Use color keys in `theme.colors` @example focusBorderColor = "blue.500"
stringhtmlSize
htmlSizeThe native HTML size attribute to be passed to the input
numberisDisabled
isDisabledIf 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
booleanisInvalid
isInvalidIf 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
booleanisReadOnly
isReadOnlyIf true, the form control will be readonly
booleanisRequired
isRequiredIf 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
booleansize
size"lg" | "md" | "sm" | "xs""md"variant
variant"outline" | "filled" | "flushed" | "unstyled""outline"Props#
The Input component composes Box so you can
pass all Box props, and React.InputHTMLAttributes.
colorScheme
colorSchemeColor Schemes for Input are not implemented in the default theme. You can extend the theme to implement them.
(string & {})errorBorderColor
errorBorderColorThe border color when the input is invalid. Use color keys in `theme.colors` @example errorBorderColor = "red.500"
stringfocusBorderColor
focusBorderColorThe border color when the input is focused. Use color keys in `theme.colors` @example focusBorderColor = "blue.500"
stringhtmlSize
htmlSizeThe native HTML size attribute to be passed to the input
numberisDisabled
isDisabledIf 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
booleanisInvalid
isInvalidIf 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
booleanisReadOnly
isReadOnlyIf true, the form control will be readonly
booleanisRequired
isRequiredIf 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
booleansize
size"lg" | "md" | "sm" | "xs""md"variant
variant"outline" | "filled" | "flushed" | "unstyled""outline"The Input component is a multipart component. Read more about how to style multipart components in the style system docs.
You can see the default theme source here to find out the parts and how to update them.