Form

Input

Text input with label, error state, and helper text.

Available inreactangular

Preview

Live previewreal component

Install

TerminalBash
npx mcp-elements add input

Usage

input-example.tsxTSX
import { Input } from '@mcp-elements/react'

export function Example() {
  return (
    <Input type="email" placeholder="you@example.com" />
  )
}

Props

PropTypeDefaultDescription
typestring'text'HTML input type (text, email, password, number, etc.)
placeholderstring—Placeholder text
valuestring—Controlled value of the input
defaultValuestring—Initial value when uncontrolled
onChange(e: React.ChangeEvent<HTMLInputElement>) => void—Called when the value changes
disabledbooleanfalseWhether the input is disabled
classNamestring—Additional classes merged onto the input