Display

Tag

A compact, removable chip for something the user picked — a filter, a member, a file.

DesignEngineeringProduct

Installation #

With the Nuxt module, every component is auto-imported — there is nothing to add. In a plain Vue project, import what you use:

Copy
import { JTag } from '@juxtui/ui'

Usage #

Copy
<JTag remove-label="Remove Engineering" @remove="removeTag">Engineering</JTag>

A JBadge is a static label for status; a JTag is something the user attached and can take off again — it always carries a remove button.

Variants & examples #

Variants#

DraftActivePendingFailedNew
Copy
<template>
  <div class="flex flex-wrap gap-2">
    <JTag>Draft</JTag>
    <JTag variant="success">Active</JTag>
    <JTag variant="warning">Pending</JTag>
    <JTag variant="destructive">Failed</JTag>
    <JTag variant="accent">New</JTag>
  </div>
</template>

Sizes, icons and disabled#

Use the leading slot for a small icon.

Design Engineering Archived

API #

Props

PropTypeDefault Description
variant'neutral' | 'success' | 'warning' | 'destructive' | 'accent''neutral'Meaning and colour.
size'sm' | 'md''md'Height: 18 or 22px.
disabledbooleanfalseFades the tag and disables the remove button.
removeLabelstring—Accessible label for the remove button, e.g. "Remove Engineering". Defaults to "Remove".

Events

EventPayload Description
remove—The remove button was clicked. Suppressed while disabled.

Slots

SlotProps Description
default—Label.
leading—Icon before the label.

Accessibility #

  • The remove control is a real <button> with its own accessible name (removeLabel, defaulting to "Remove") — set it to name the specific tag, e.g. ` Remove ${tag} `, so a list of tags doesn’t announce as several identical "Remove" buttons.