Arctic Design
Get StartedFoundationsComponentsExamples
K

TextInput

Offers a single-line input field for users to enter text or data.

Usage
Size
Disabled
Read Only
import { useState } from 'react';
import { TextInput } from '@arctic-kit/snow';
function Demo() {
const [value, setValue] = useState('');
return (
<TextInput
label="Name" placeholder="Enter your name here" size="medium"
value={value}
onChange={(event) => setValue(event.target.value)}
/>
);
}

API Reference

PropsTypeDefault
classNamestring | undefined---
containerClassNamestring | undefined---
containerStyleCSSProperties | undefined---
disabledboolean | undefined---
errorTextstring | undefined---
labelstring | undefined---
maxLengthnumber | undefined---
onBlur(((event: ChangeEvent<HTMLInputElement> | ChangeEvent<HTMLTextAreaElement>) => void) & ((event: ChangeEvent<HTMLInputElement>) => void)) | undefined---
onChange((event: ChangeEvent<HTMLInputElement>) => void) | undefined---
placeholderstring | undefined---
prefixReactNode---
prefixPropsHTMLAttributes<"div"> | undefined---
readOnlyboolean | undefinedfalse
requiredboolean | undefined---
size"small" | "medium" | "large"medium
styleCSSProperties | undefined---
suffixReactNode---
suffixPropsHTMLAttributes<"div"> | undefined---
typeHTMLInputTypeAttribute | undefinedtext
valuestring | undefined---