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.)
placeholderstringPlaceholder text
valuestringControlled value of the input
defaultValuestringInitial value when uncontrolled
onChange(e: React.ChangeEvent<HTMLInputElement>) => voidCalled when the value changes
disabledbooleanfalseWhether the input is disabled
classNamestringAdditional classes merged onto the input