组件特性

Badge

展示短标签、状态和版本信息的徽章组件。

Usage

DefaultSmall
::badge
  Default
::
::badge{size="sm"}
  Small
::

Variants

Outline
:badge[Outline]{variant="outline"}
Link
::badge{variant="outline" type="info" to="https://github.com/ZTL-UwU/shadcn-docs-nuxt" target="_blank"}
Link
::

Props

type
'default' | 'info' | 'warning' | 'success' | 'danger' | 'lime'
variant
'default' | 'secondary' | 'destructive' | 'outline'
size
'md' | 'sm'
to
string
Link URL
target
Target
A target attribute value to apply on the link