redrob-labs

Name Input

Forms

About

A single text field for capturing a person's full name, with optional extra fields for a name in their own script and a preferred name, instead of splitting a name into first/last.

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

Code

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

Usage.tsx

"use client";

import * as React from "react";
import NameInput, { NameValue } from "@/components/ui/name-input";

export default function NameInputWithScriptAndPreferredNameDemo() {
  const [value, setValue] = React.useState<NameValue>({
    full: "Aditi Sharma",
    second: "अदिति शर्मा",
    preferred: "Adi",
  });

  return (
    <div className="flex w-full max-w-sm flex-col gap-4 bg-background p-6 text-foreground">
      <NameInput
        value={value}
        second
        preferred
        onChange={(next) => setValue(next)}
      />
    </div>
  );
}

More by redrob-labs

View all
  • Alert

    Alert

    44
  • Meter

    Meter

    29
  • Schedule Picker

    Schedule Picker

    28
  • Switch

    Switch

    11
  • Status Card

    Status Card

    10
  • Hero Section

    Hero Section

    10
  • Memory Scope

    Memory Scope

    9
  • Accordion

    Accordion

    5

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