pearpages

Text Field

Forms

About

A single-line text input with a built-in label, description and error message wired for screen readers, plus an optional leading icon and a clear button.

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Text Field to your project and fits it to your theme.

Code

How Text Field is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

import { TextField } from "@/components/ui/text-field";

export default function TextFieldWithErrorDemo() {
  return (
    <div className="w-full max-w-sm mx-auto p-6 bg-background text-foreground">
      <TextField
        label="Email address"
        defaultValue="pere@"
        error="Enter a valid email address."
      />
    </div>
  );
}

Dependencies

More by pearpages

View all
  • Popover

    Popover

    6
  • Slider

    Slider

  • Switch

    Switch

  • Data Grid

    Data Grid

  • Tabs

    Tabs

More in Forms

View all
  • Premium Auth

    Premium Auth

    592
  • Login 1

    Login 1

    70
  • Contact Card

    Contact Card

    1.1K
  • Contact Form

    Contact Form

    28
  • Form

    Form

    6
  • HeroUI Field Error

    HeroUI Field Error

    13
  • Form

    Form

    4
  • Book A Demo 4

    Book A Demo 4

    69