Documentation
Input

Input

Retrieve text input from a user.

Usage

First of all, you need to import the Input component from the kitchn package.

import { Input } from "kitchn"

Default

Sizes

Sizes, prefix, and suffix

Disabled

Prefix and suffix

Prefix and suffix disabled

Clearable

Types

Error

Label

Props

NameTypeDefaultRequiredDescriptionAccepted values
placeholderstring--The placeholder of the input.-
prefixJSX.Element | string--The prefix of the input.-
suffixJSX.Element | string--The suffix of the input.-
initialValuestring--The initial value of the input.-
valuestring--The value of the input.-
disabledbooleanfalse-The status of the input (disabled or not).-
prefixStylingbooleantrue-The status of the prefix (styled or not).-
suffixStylingbooleantrue-The status of the suffix (styled or not).-
prefixContainerbooleantrue-The status of the prefix container (whether there is one or not).-
suffixContainerbooleantrue-The status of the suffix container (whether there is one or not).-
clearablebooleanfalse-The type of the input (clearable or not).-
widthnumber | string--The width of the input.-
errorstring--The error message of the input.-
readOnlybooleanfalse-The type of the input (read-only or not).-
onClearClick(event: React.MouseEvent<HTMLDivElement>) => void--The click event handler of the input's clear button.-
readOnlybooleanfalse-The type of the input (read-only or not).-
typestring--The type of the input.primary, secondary, info, success, warning, danger, light, dark
labelstring--The label of the input.-