About
An input field for entering and managing a list of tags, where each tag can be added, edited, deleted, or cleared with keyboard and mouse interactions.
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Tags Input to your project and fits it to your theme.
Code
How Tags 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 {
TagsInput,
TagsInputLabel,
TagsInputList,
TagsInputInput,
TagsInputItem,
TagsInputClear,
} from "@/components/ui/tags-input";
export default function TagsInputDemo() {
const [value, setValue] = React.useState(["React", "TypeScript", "Tailwind"]);
return (
<div className="flex items-center justify-center p-10">
<TagsInput value={value} onValueChange={setValue} editable max={8}>
<TagsInputLabel>Skills</TagsInputLabel>
<TagsInputList>
{value.map((tag) => (
<TagsInputItem key={tag} value={tag}>
{tag}
</TagsInputItem>
))}
<TagsInputInput placeholder="Add a skill..." />
</TagsInputList>
<TagsInputClear className="self-start text-xs text-muted-foreground underline-offset-2 hover:underline">
Clear all
</TagsInputClear>
</TagsInput>
</div>
);
}
















![Form [react-aria-components]](https://cdn.21st.dev/cdn-cgi/image/fit=scale-down,width=640,quality=75,format=webp/https://cdn.21st.dev/user_jolbol1/field/814/preview.png)