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 NameInputDemo() {
const [value, setValue] = React.useState<NameValue>({ full: "" });
return (
<div className="flex w-full max-w-sm flex-col gap-4 bg-background p-6 text-foreground">
<NameInput value={value} onChange={(next) => setValue(next)} />
</div>
);
}
















