darshan-rajadhyaksha

Input

Forms

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
  • Backdrop

    Backdrop

    1
  • Switch

    Switch

  • Avatar

    Avatar

  • Chip

    Chip

  • Progress Bar

    Progress Bar

  • Accessible Dialog

    Accessible Dialog

  • Card Content

    Card Content

  • Breadcrumbs

    Breadcrumbs

More in Forms

View all
  • Premium Auth

    Premium Auth

    516
  • Contact Card

    Contact Card

    1K
  • Book A Demo 1

    Book A Demo 1

    70
  • Login 1

    Login 1

    52
  • Login Card

    Login Card

    26
  • Form

    Form

    16
  • Authentication Card

    Authentication Card

    47
  • Login Form

    Login Form

    6