Input

Stable

Text input fields with labels, placeholders, and error states.

Import

import { Input } from '@brutal-ui/react';

Basic Usage

const [value, setValue] = useState('');

<Input
  label='Email'
  type='email'
  placeholder='your@email.com'
  value={value}
  onChange={(e) => setValue(e.target.value)}
/>

With Error

Password must be at least 8 characters

<Input
  label='Password'
  type='password'
  placeholder='••••••••'
  error='Password must be at least 8 characters'
/>

Disabled State

<Input
  label='Username'
  value='john_doe_123'
  disabled
/>

Different Types

Props

PropTypeDefaultDescription
labelstring-Input label text
typestring"text"HTML input type
placeholderstring-Placeholder text
errorstring-Error message to display
disabledbooleanfalseDisable input