Skip to content

Tag

A removable or clickable label used for user-selected categories, filters, or metadata annotations.

Basic

Tailwind v4
vue
<Tag text="Release 1.0" />

Colors

Tailwind v4
vue
<Tag text="Standard" color="standard" />
<Tag text="Blue" color="blue" />
<Tag text="Green" color="green" />
<Tag text="Teal" color="teal" />
<Tag text="Purple" color="purple" />
<Tag text="Red" color="red" />
<Tag text="Yellow" color="yellow" />
<Tag text="Orange" color="orange" />

Removable

When isRemovable is true, a × button is rendered. Listen to the remove event to handle removal.

Tailwind v4
vue
<script setup>
import { ref } from 'vue'
const tags = ref(['Frontend', 'Design', 'API'])
</script>

<template>
  <Tag
    v-for="tag in tags"
    :key="tag"
    :text="tag"
    :is-removable="true"
    @remove="tags = tags.filter(t => t !== tag)"
  />
</template>

When href is provided, the tag text becomes a navigable anchor.

Tailwind v4
vue
<Tag text="View docs" color="blue" href="/components/tag" />

Props

PropTypeDefaultDescription
textstringTag label (required)
color'standard' | 'blue' | 'green' | 'teal' | 'purple' | 'red' | 'yellow' | 'orange''standard'Color scheme
isRemovablebooleanfalseShow a × remove button
hrefstringIf provided, tag text renders as a link

Emits

EventPayloadDescription
removeFired when the × button is clicked

Private — Jetpack Labs internal use only