Components
Tag
Alias of Badge for lightweight labels and filters.
Installation
$ npx veil-ui@latest add tagUsage
import { Tag } from "@/components/ui/tag";
<Tag variant="secondary">Beta</Tag>;Examples
Basic
NewBetaArchived
Status
LiveQueuedDraft
API reference
Tag and tagVariants re-export Badge and its
variants (default, secondary, outline, muted, destructive).
Accessibility
- Tags are static text, not interactive; use buttons for dismissible filters.
- Because the label is real text, screen readers announce it directly.
Vue and plain HTML
This component also ships for Vue (Reka UI) and plain HTML. Install it with npx veil-ui add tag --framework vue or switch the framework in components.json.
<script setup lang="ts">
import { Badge } from "@/components/ui/badge";
const props = withDefaults(
defineProps<{
variant?:
| "default"
| "secondary"
| "outline"
| "muted"
| "destructive";
asChild?: boolean;
class?: string;
}>(),
{ asChild: false },
);
</script>
<template>
<Badge
:variant="props.variant"
:as-child="props.asChild"
:class="props.class"
>
<slot />
</Badge>
</template>