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/badge.json
Use
<script setup lang="ts">
import { CircleCheck } from '@lucide/vue'
import { Badge } from '@/components/ui/badge'
</script>
<template>
<Badge variant="warning">Partial</Badge>
<Badge variant="success" size="state"><CircleCheck aria-hidden="true" />Synced to ERP</Badge>
</template>
Props
| Prop | Values | Notes |
|---|---|---|
variant |
default, outline, secondary, destructive, ghost, link, and the Beehexa roles info, success, warning, danger, neutral, brand |
The shadcn-vue names keep working: secondary is neutral, destructive is danger |
size |
default, lg, state |
Beehexa addition. 20, 24 and 32 px; state is the solid state label |
as |
string or component | Default div. Use span inside text |
as-child |
boolean | Render your own element with the badge styles |
badgeVariants({ variant, size }) gives the classes for another element.
Built on
A reka-ui Primitive with the shadcn-vue Badge API. Beehexa replaces the colours with the status label roles, adds the status variants and size, and uses 4 px corners instead of a pill.
Differences from shadcn-vue
defaultis an outlined label, not a solid dark fill: a solid fill is kept for the one state label on a page.- No hover on
default,secondaryoroutlinewhen rendered as a link: a status label never looks clickable.