f0rextasy

Field Array

Forms 3

About

A dynamic form field list that lets users add, remove, and reorder text input rows, for building things like tag lists or variable key-value forms.

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

Code

How Field Array 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 { FieldArray, type FieldArrayRow } from "@/components/ui/field-array";

export default function FieldArrayDemo() {
  const [rows, setRows] = React.useState<FieldArrayRow[]>([
    { id: "row-1", value: "Alpha" },
    { id: "row-2", value: "Beta" },
    { id: "row-3", value: "Gamma" },
  ]);

  return (
    <div className="flex min-h-[320px] w-full items-center justify-center bg-background p-6 text-foreground">
      <FieldArray
        label="Tags"
        rows={rows}
        onRowsChange={setRows}
        placeholder="Enter a value…"
      />
    </div>
  );
}

More by f0rextasy

View all
  • Newsletter Signup Card

    Newsletter Signup Card

    17
  • Board Checklist

    Board Checklist

    15
  • Stamp Seal

    Stamp Seal

    13
  • Network Graph

    Network Graph

    13
  • Navbar

    Navbar

    10
  • Running Order Timeline

    Running Order Timeline

    9
  • Milestone Chart

    Milestone Chart

    9
  • Empty State Card

    Empty State Card

    6

More in Forms

View all
  • Premium Auth

    Premium Auth

    562
  • Book A Demo 1

    Book A Demo 1

    90
  • Contact Card

    Contact Card

    1.1K
  • Login 2

    Login 2

    12
  • Authentication Card

    Authentication Card

    51
  • Form

    Form

    139
  • Card Studio

    Card Studio

    46
  • Book A Demo 3

    Book A Demo 3

    101