On this page

Tags input

Install, props and the parts Tags input is built from.

Install

Run this in the app, after shadcn-vue init and the Beehexa theme (Button › Code):

npx shadcn-vue@latest add https://beehexa.design/r/tags-input.json

Use

<script setup lang="ts">
import { ref } from 'vue'
import { TagsInput, TagsInputInput, TagsInputItem, TagsInputItemDelete, TagsInputItemText } from '@/components/ui/tags-input'
const tags = ref(['wholesale'])
</script>

<template>
  <div>
    <TagsInput v-model="tags">
      <TagsInputItem v-for="t in tags" :key="t" :value="t">
        <TagsInputItemText /><TagsInputItemDelete />
      </TagsInputItem>
      <TagsInputInput placeholder="Add a label" />
    </TagsInput>
  </div>
</template>

Props

Part Prop Values Notes
TagsInput v-model, delimiter, add-on-paste, disabled string[], string, boolean

Built on

reka-ui TagsInputRoot, as the shadcn-vue Tags input.