
Tags dropdown with TagsEmpty message when search returns no matches.
@shadcnblocks
example/tags/tags-empty-1.tsx
"use client";
import { useState } from "react";
import {
Tags,
TagsContent,
TagsEmpty,
TagsGroup,
TagsInput,
TagsItem,
TagsList,
TagsTrigger,
} from "@/components/kibo-ui/tags";
export const title = "Empty state";
const tags = [
{ value: "open", label: "Open" },
{ value: "closed", label: "Closed" },
{ value: "pending", label: "Pending" },
];
const Example = () => {
const [value, setValue] = useState("");
return (
<div className="w-full max-w-md">
<Tags value={value} setValue={setValue}>
<TagsTrigger />
<TagsContent>
<TagsInput placeholder="Search status..." />
<TagsList>
<TagsEmpty>No matching tags found.</TagsEmpty>
<TagsGroup>
{tags.map((tag) => (
<TagsItem key={tag.value} value={tag.value}>
{tag.label}
</TagsItem>
))}
</TagsGroup>
</TagsList>
</TagsContent>
</Tags>
</div>
);
};
export default Example;
































