Skip to content

Tag

Short labels for marking and categorization, with optional close button.

Basic Usage

VueReactSvelte
vue
<ATag>Vue</ATag>
<ATag>React</ATag>
<ATag>Svelte</ATag>

Closable

VueReactSvelte
vue
<script setup>
import { ref } from 'vue'
const tags = ref(['Vue', 'React', 'Svelte'])
</script>

<ATag
  v-for="tag in tags"
  :key="tag"
  closable
  @close="tags = tags.filter(t => t !== tag)"
>
  {{ tag }}
</ATag>

API

Props

NameTypeDefaultDescription
closablebooleanfalseShow close button
disabledbooleanfalseDisabled

Emits

NameParametersDescription
closeTriggered after close animation completes

Slots

NameDescription
defaultTag text content

Interaction

  • Close animation: scale(0.85) + opacity(0) fade out
  • Duration 220ms, matching --duration-base

MIT License