Input

form

Text input with label, helper text, error state, and optional icon adornments. Animated focus ring.

import { Input } from '@/components/forge'

Preview

Input

Try button, modal, or tabs

This username is taken

Code Example

Props

PropTypeDefaultRequiredDescription
labelstring-NoVisible label above the input
helperTextstring-NoHelper text shown below the input
errorstring-NoError message - replaces helper text and applies error styling
iconLeftReact.ReactNode-NoIcon element rendered on the left side
iconRightReact.ReactNode-NoIcon element rendered on the right side
typestring'text'NoHTML input type

Variants

defaulterror

Accessibility

  • Label is always associated with input via htmlFor
  • Error message is linked via aria-describedby
  • Error state adds aria-invalid="true"

Related Components