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 TextFieldWithDescriptionDemo() {
  return (
    <div className="w-full max-w-sm mx-auto p-6 bg-background text-foreground">
      <TextField
        label="Email address"
        placeholder="you@example.com"
        description="We only use it to send the receipt."
      />
    </div>
  );
}

Dependencies

More by pearpages

View all
  • Popover

    Popover

    7
  • Slider

    Slider

  • Switch

    Switch

  • Data Grid

    Data Grid

  • Tabs

    Tabs

More in Forms

View all
  • Form

    Form

    7
  • Contact Form

    Contact Form

    32
  • Login 2

    Login 2

    16
  • Contact Card

    Contact Card

    1.1K
  • Book A Demo 1

    Book A Demo 1

    94
  • Paper Plane

    Paper Plane

    80
  • Premium Auth

    Premium Auth

    613
  • Authentication Card

    Authentication Card

    52