diff --git a/apps/www/.vitepress/theme/config/docs.ts b/apps/www/.vitepress/theme/config/docs.ts
index 7432c50a..34d2cd20 100644
--- a/apps/www/.vitepress/theme/config/docs.ts
+++ b/apps/www/.vitepress/theme/config/docs.ts
@@ -326,6 +326,12 @@ export const docsConfig: DocsConfig = {
href: '/docs/components/tabs',
items: [],
},
+ {
+ title: 'Tags Input',
+ href: '/docs/components/tags-input',
+ label: 'New',
+ items: [],
+ },
{
title: 'Textarea',
href: '/docs/components/textarea',
diff --git a/apps/www/__registry__/index.ts b/apps/www/__registry__/index.ts
index 1da86efe..b423c462 100644
--- a/apps/www/__registry__/index.ts
+++ b/apps/www/__registry__/index.ts
@@ -639,6 +639,20 @@ export const Index = {
component: () => import('../src/lib/registry/default/example/TabsDemo.vue').then(m => m.default),
files: ['../src/lib/registry/default/example/TabsDemo.vue'],
},
+ TagsInputComboboxDemo: {
+ name: 'TagsInputComboboxDemo',
+ type: 'components:example',
+ registryDependencies: ['command', 'tags-input'],
+ component: () => import('../src/lib/registry/default/example/TagsInputComboboxDemo.vue').then(m => m.default),
+ files: ['../src/lib/registry/default/example/TagsInputComboboxDemo.vue'],
+ },
+ TagsInputDemo: {
+ name: 'TagsInputDemo',
+ type: 'components:example',
+ registryDependencies: ['tags-input'],
+ component: () => import('../src/lib/registry/default/example/TagsInputDemo.vue').then(m => m.default),
+ files: ['../src/lib/registry/default/example/TagsInputDemo.vue'],
+ },
TextareaDemo: {
name: 'TextareaDemo',
type: 'components:example',
@@ -1565,6 +1579,20 @@ export const Index = {
component: () => import('../src/lib/registry/new-york/example/TabsDemo.vue').then(m => m.default),
files: ['../src/lib/registry/new-york/example/TabsDemo.vue'],
},
+ TagsInputComboboxDemo: {
+ name: 'TagsInputComboboxDemo',
+ type: 'components:example',
+ registryDependencies: ['command', 'tags-input'],
+ component: () => import('../src/lib/registry/new-york/example/TagsInputComboboxDemo.vue').then(m => m.default),
+ files: ['../src/lib/registry/new-york/example/TagsInputComboboxDemo.vue'],
+ },
+ TagsInputDemo: {
+ name: 'TagsInputDemo',
+ type: 'components:example',
+ registryDependencies: ['tags-input'],
+ component: () => import('../src/lib/registry/new-york/example/TagsInputDemo.vue').then(m => m.default),
+ files: ['../src/lib/registry/new-york/example/TagsInputDemo.vue'],
+ },
TextareaDemo: {
name: 'TextareaDemo',
type: 'components:example',
diff --git a/apps/www/src/content/docs/components/tags-input.md b/apps/www/src/content/docs/components/tags-input.md
new file mode 100644
index 00000000..4833e967
--- /dev/null
+++ b/apps/www/src/content/docs/components/tags-input.md
@@ -0,0 +1,21 @@
+---
+title: Tags Input
+description: Tag inputs render tags inside an input, followed by an actual text input.
+source: apps/www/src/lib/registry/default/ui/tags-input
+primitive: https://www.radix-vue.com/components/tags-input.html
+---
+
+
+
+## Installation
+
+```bash
+npx shadcn-vue@latest add tags-input
+```
+
+
+## Usage
+
+### Tags with Combobox
+
+
diff --git a/apps/www/src/examples/tasks/components/DataTableFacetedFilter.vue b/apps/www/src/examples/tasks/components/DataTableFacetedFilter.vue
index 8261aefc..4ee0ff54 100644
--- a/apps/www/src/examples/tasks/components/DataTableFacetedFilter.vue
+++ b/apps/www/src/examples/tasks/components/DataTableFacetedFilter.vue
@@ -84,7 +84,8 @@ const selectedValues = computed(() => new Set(props.column?.getFilterValue() as
v-for="option in options"
:key="option.value"
:value="option"
- @select="() => {
+ @select="(e) => {
+ console.log(e.detail.value)
const isSelected = selectedValues.has(option.value)
if (isSelected) {
selectedValues.delete(option.value)
diff --git a/apps/www/src/lib/registry/default/example/TagsInputComboboxDemo.vue b/apps/www/src/lib/registry/default/example/TagsInputComboboxDemo.vue
new file mode 100644
index 00000000..23427ba1
--- /dev/null
+++ b/apps/www/src/lib/registry/default/example/TagsInputComboboxDemo.vue
@@ -0,0 +1,65 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {
+ if (typeof ev.detail.value === 'string') {
+ searchTerm = ''
+ modelValue.push(ev.detail.value)
+ }
+
+ if (filteredFrameworks.length === 0) {
+ open = false
+ }
+ }"
+ >
+ {{ framework.label }}
+
+
+
+
+
+
+
diff --git a/apps/www/src/lib/registry/default/example/TagsInputDemo.vue b/apps/www/src/lib/registry/default/example/TagsInputDemo.vue
new file mode 100644
index 00000000..260005b6
--- /dev/null
+++ b/apps/www/src/lib/registry/default/example/TagsInputDemo.vue
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/apps/www/src/lib/registry/default/ui/tags-input/TagsInput.vue b/apps/www/src/lib/registry/default/ui/tags-input/TagsInput.vue
new file mode 100644
index 00000000..acf6bd3c
--- /dev/null
+++ b/apps/www/src/lib/registry/default/ui/tags-input/TagsInput.vue
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
diff --git a/apps/www/src/lib/registry/default/ui/tags-input/TagsInputInput.vue b/apps/www/src/lib/registry/default/ui/tags-input/TagsInputInput.vue
new file mode 100644
index 00000000..ccb08a15
--- /dev/null
+++ b/apps/www/src/lib/registry/default/ui/tags-input/TagsInputInput.vue
@@ -0,0 +1,19 @@
+
+
+
+
+
diff --git a/apps/www/src/lib/registry/default/ui/tags-input/TagsInputItem.vue b/apps/www/src/lib/registry/default/ui/tags-input/TagsInputItem.vue
new file mode 100644
index 00000000..23fae205
--- /dev/null
+++ b/apps/www/src/lib/registry/default/ui/tags-input/TagsInputItem.vue
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
diff --git a/apps/www/src/lib/registry/default/ui/tags-input/TagsInputItemDelete.vue b/apps/www/src/lib/registry/default/ui/tags-input/TagsInputItemDelete.vue
new file mode 100644
index 00000000..544eebc4
--- /dev/null
+++ b/apps/www/src/lib/registry/default/ui/tags-input/TagsInputItemDelete.vue
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+
+
+
diff --git a/apps/www/src/lib/registry/default/ui/tags-input/TagsInputItemText.vue b/apps/www/src/lib/registry/default/ui/tags-input/TagsInputItemText.vue
new file mode 100644
index 00000000..91ade8b6
--- /dev/null
+++ b/apps/www/src/lib/registry/default/ui/tags-input/TagsInputItemText.vue
@@ -0,0 +1,19 @@
+
+
+
+
+
diff --git a/apps/www/src/lib/registry/default/ui/tags-input/index.ts b/apps/www/src/lib/registry/default/ui/tags-input/index.ts
new file mode 100644
index 00000000..31305f34
--- /dev/null
+++ b/apps/www/src/lib/registry/default/ui/tags-input/index.ts
@@ -0,0 +1,5 @@
+export { default as TagsInput } from './TagsInput.vue'
+export { default as TagsInputInput } from './TagsInputInput.vue'
+export { default as TagsInputItem } from './TagsInputItem.vue'
+export { default as TagsInputItemDelete } from './TagsInputItemDelete.vue'
+export { default as TagsInputItemText } from './TagsInputItemText.vue'
diff --git a/apps/www/src/lib/registry/new-york/example/TagsInputComboboxDemo.vue b/apps/www/src/lib/registry/new-york/example/TagsInputComboboxDemo.vue
new file mode 100644
index 00000000..00a53697
--- /dev/null
+++ b/apps/www/src/lib/registry/new-york/example/TagsInputComboboxDemo.vue
@@ -0,0 +1,65 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {
+ if (typeof ev.detail.value === 'string') {
+ searchTerm = ''
+ modelValue.push(ev.detail.value)
+ }
+
+ if (filteredFrameworks.length === 0) {
+ open = false
+ }
+ }"
+ >
+ {{ framework.label }}
+
+
+
+
+
+
+
diff --git a/apps/www/src/lib/registry/new-york/example/TagsInputDemo.vue b/apps/www/src/lib/registry/new-york/example/TagsInputDemo.vue
new file mode 100644
index 00000000..b744bc9a
--- /dev/null
+++ b/apps/www/src/lib/registry/new-york/example/TagsInputDemo.vue
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/apps/www/src/lib/registry/new-york/ui/tags-input/TagsInput.vue b/apps/www/src/lib/registry/new-york/ui/tags-input/TagsInput.vue
new file mode 100644
index 00000000..5989dc20
--- /dev/null
+++ b/apps/www/src/lib/registry/new-york/ui/tags-input/TagsInput.vue
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
diff --git a/apps/www/src/lib/registry/new-york/ui/tags-input/TagsInputInput.vue b/apps/www/src/lib/registry/new-york/ui/tags-input/TagsInputInput.vue
new file mode 100644
index 00000000..ff8f1dcc
--- /dev/null
+++ b/apps/www/src/lib/registry/new-york/ui/tags-input/TagsInputInput.vue
@@ -0,0 +1,19 @@
+
+
+
+
+
diff --git a/apps/www/src/lib/registry/new-york/ui/tags-input/TagsInputItem.vue b/apps/www/src/lib/registry/new-york/ui/tags-input/TagsInputItem.vue
new file mode 100644
index 00000000..c3cc8d40
--- /dev/null
+++ b/apps/www/src/lib/registry/new-york/ui/tags-input/TagsInputItem.vue
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
diff --git a/apps/www/src/lib/registry/new-york/ui/tags-input/TagsInputItemDelete.vue b/apps/www/src/lib/registry/new-york/ui/tags-input/TagsInputItemDelete.vue
new file mode 100644
index 00000000..c72ee631
--- /dev/null
+++ b/apps/www/src/lib/registry/new-york/ui/tags-input/TagsInputItemDelete.vue
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+
+
+
diff --git a/apps/www/src/lib/registry/new-york/ui/tags-input/TagsInputItemText.vue b/apps/www/src/lib/registry/new-york/ui/tags-input/TagsInputItemText.vue
new file mode 100644
index 00000000..8948bd07
--- /dev/null
+++ b/apps/www/src/lib/registry/new-york/ui/tags-input/TagsInputItemText.vue
@@ -0,0 +1,19 @@
+
+
+
+
+
diff --git a/apps/www/src/lib/registry/new-york/ui/tags-input/index.ts b/apps/www/src/lib/registry/new-york/ui/tags-input/index.ts
new file mode 100644
index 00000000..31305f34
--- /dev/null
+++ b/apps/www/src/lib/registry/new-york/ui/tags-input/index.ts
@@ -0,0 +1,5 @@
+export { default as TagsInput } from './TagsInput.vue'
+export { default as TagsInputInput } from './TagsInputInput.vue'
+export { default as TagsInputItem } from './TagsInputItem.vue'
+export { default as TagsInputItemDelete } from './TagsInputItemDelete.vue'
+export { default as TagsInputItemText } from './TagsInputItemText.vue'
diff --git a/apps/www/src/public/registry/index.json b/apps/www/src/public/registry/index.json
index de3369a8..834c92eb 100644
--- a/apps/www/src/public/registry/index.json
+++ b/apps/www/src/public/registry/index.json
@@ -593,6 +593,22 @@
],
"type": "components:ui"
},
+ {
+ "name": "tags-input",
+ "dependencies": [],
+ "registryDependencies": [
+ "utils"
+ ],
+ "files": [
+ "ui/tags-input/TagsInput.vue",
+ "ui/tags-input/TagsInputInput.vue",
+ "ui/tags-input/TagsInputItem.vue",
+ "ui/tags-input/TagsInputItemDelete.vue",
+ "ui/tags-input/TagsInputItemText.vue",
+ "ui/tags-input/index.ts"
+ ],
+ "type": "components:ui"
+ },
{
"name": "textarea",
"dependencies": [
diff --git a/apps/www/src/public/registry/styles/default/tags-input.json b/apps/www/src/public/registry/styles/default/tags-input.json
new file mode 100644
index 00000000..01060323
--- /dev/null
+++ b/apps/www/src/public/registry/styles/default/tags-input.json
@@ -0,0 +1,34 @@
+{
+ "name": "tags-input",
+ "dependencies": [],
+ "registryDependencies": [
+ "utils"
+ ],
+ "files": [
+ {
+ "name": "TagsInput.vue",
+ "content": "\n\n\n \n \n \n\n"
+ },
+ {
+ "name": "TagsInputInput.vue",
+ "content": "\n\n\n \n\n"
+ },
+ {
+ "name": "TagsInputItem.vue",
+ "content": "\n\n\n \n \n \n\n"
+ },
+ {
+ "name": "TagsInputItemDelete.vue",
+ "content": "\n\n\n \n \n \n \n \n\n"
+ },
+ {
+ "name": "TagsInputItemText.vue",
+ "content": "\n\n\n \n\n"
+ },
+ {
+ "name": "index.ts",
+ "content": "export { default as TagsInput } from './TagsInput.vue'\nexport { default as TagsInputInput } from './TagsInputInput.vue'\nexport { default as TagsInputItem } from './TagsInputItem.vue'\nexport { default as TagsInputItemDelete } from './TagsInputItemDelete.vue'\nexport { default as TagsInputItemText } from './TagsInputItemText.vue'\n"
+ }
+ ],
+ "type": "components:ui"
+}
\ No newline at end of file
diff --git a/apps/www/src/public/registry/styles/new-york/tags-input.json b/apps/www/src/public/registry/styles/new-york/tags-input.json
new file mode 100644
index 00000000..3eaa3f7e
--- /dev/null
+++ b/apps/www/src/public/registry/styles/new-york/tags-input.json
@@ -0,0 +1,34 @@
+{
+ "name": "tags-input",
+ "dependencies": [],
+ "registryDependencies": [
+ "utils"
+ ],
+ "files": [
+ {
+ "name": "TagsInput.vue",
+ "content": "\n\n\n \n \n \n\n"
+ },
+ {
+ "name": "TagsInputInput.vue",
+ "content": "\n\n\n \n\n"
+ },
+ {
+ "name": "TagsInputItem.vue",
+ "content": "\n\n\n \n \n \n\n"
+ },
+ {
+ "name": "TagsInputItemDelete.vue",
+ "content": "\n\n\n \n \n \n \n \n\n"
+ },
+ {
+ "name": "TagsInputItemText.vue",
+ "content": "\n\n\n \n\n"
+ },
+ {
+ "name": "index.ts",
+ "content": "export { default as TagsInput } from './TagsInput.vue'\nexport { default as TagsInputInput } from './TagsInputInput.vue'\nexport { default as TagsInputItem } from './TagsInputItem.vue'\nexport { default as TagsInputItemDelete } from './TagsInputItemDelete.vue'\nexport { default as TagsInputItemText } from './TagsInputItemText.vue'\n"
+ }
+ ],
+ "type": "components:ui"
+}
\ No newline at end of file