Selection
Blogging
Messaging
Map
Installation
$ pnpm dlx shadcn@latest add @mcpcn/tag-select
Usage
import {
TagSelect,
TagSelectActions,
TagSelectContent,
TagSelectTags,
} from "@/components/ui/tag-select";<TagSelect>
<TagSelectContent>
<TagSelectTags />
<TagSelectActions />
</TagSelectContent>
</TagSelect>Composition
Use the following composition to build an TagSelect:
TagSelect
├── TagSelectActions
├── TagSelectContent
├── TagSelectItem
└── TagSelectTagsOpenUI Integration
Install the OpenUI React packages.
pnpm add @openuidev/react-lang zodAdd TagSelect to a component library and map it to the installed component.
import { createLibrary, defineComponent } from "@openuidev/react-lang";
import { z } from "zod/v4";
import {
TagSelect,
TagSelectActions,
TagSelectContent,
TagSelectTags,
} from "@/components/ui/tag-select";
const OpenUITagSelect = defineComponent({
name: "TagSelect",
description:
"Colored tag selector with single or multiple selection and color variants.",
props: z.object({}),
component: () => (
<TagSelect>
<TagSelectContent>
<TagSelectTags />
<TagSelectActions />
</TagSelectContent>
</TagSelect>
),
});
export const tag_selectLibrary = createLibrary({
root: "TagSelect",
components: [OpenUITagSelect],
});For richer generated compositions, define the child primitives separately and connect them with .ref fields. See Defining Components in the OpenUI documentation.
json-render Integration
Install the json-render React packages.
pnpm add @json-render/core @json-render/react zodAdd TagSelect to a component catalog and map it to the installed component.
import { defineCatalog } from "@json-render/core";
import { defineRegistry } from "@json-render/react";
import { schema } from "@json-render/react/schema";
import { z } from "zod";
import {
TagSelect,
TagSelectActions,
TagSelectContent,
TagSelectTags,
} from "@/components/ui/tag-select";
export const catalog = defineCatalog(schema, {
components: {
TagSelect: {
props: z.object({}),
description:
"Colored tag selector with single or multiple selection and color variants.",
},
},
});
export const { registry } = defineRegistry(catalog, {
components: {
TagSelect: () => (
<TagSelect>
<TagSelectContent>
<TagSelectTags />
<TagSelectActions />
</TagSelectContent>
</TagSelect>
),
},
});Use catalog.prompt() to constrain model output, then render the generated spec with the json-render React Renderer. See the json-render Quick Start for the provider and streaming setup.
API Reference
See the Base UI documentation for more information.