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

    18
  • Schedule Picker

    Schedule Picker

    15
  • Hero Section

    Hero Section

    7
  • Switch

    Switch

    5
  • Status Card

    Status Card

    4
  • Meter

    Meter

    2
  • Memory Scope

    Memory Scope

    2
  • Accordion

    Accordion

    2

More in Forms

View all
  • Premium Auth

    Premium Auth

    500
  • Login 2

    Login 2

    7
  • Authentication Card

    Authentication Card

    47
  • Login 1

    Login 1

    52
  • Contact Card

    Contact Card

    1K
  • Login Form

    Login Form

    6
  • Form

    Form

    16
  • Book A Demo 3

    Book A Demo 3

    83