darshan-rajadhyaksha

Input

Forms 2

About

A styled text input with optional prefix/suffix adornments, size, color and variant (filled/outlined/ghost) options, ported from rocksolidjs.com's SolidJS Input component (by Darshan Rajadhyaksha, MIT licensed).

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

Code

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

Usage.tsx

import Input from "@/components/ui/input";

export default function InputDemo() {
  return (
    <div className="flex w-full max-w-sm flex-col gap-4">
      <Input placeholder="Username" />
      <Input placeholder="Website" prefix="https://" suffix=".com" />
      <Input placeholder="Email" type="email" color="info" variant="filled" />
      <Input placeholder="Disabled" disabled defaultValue="Can't edit this" />
    </div>
  );
}

Dependencies

More by darshan-rajadhyaksha

View all
  • Switch

    Switch

    4
  • Backdrop

    Backdrop

    3
  • Accessible Dialog

    Accessible Dialog

    2
  • Divider

    Divider

  • Avatar

    Avatar

  • Chip

    Chip

  • Progress Bar

    Progress Bar

  • Card Content

    Card Content

More in Forms

View all
  • Premium Auth

    Premium Auth

    593
  • Contact Form

    Contact Form

    28
  • Form

    Form

    4
  • Login 1

    Login 1

    70
  • Book A Demo 1

    Book A Demo 1

    94
  • Contact Card

    Contact Card

    1.1K
  • HeroUI Field Error

    HeroUI Field Error

    13
  • Form [react-aria-components]

    Form [react-aria-components]

    19