组件特性
Badge
展示短标签、状态和版本信息的徽章组件。
Usage
DefaultSmall
::badge
Default
::
::badge{size="sm"}
Small
::
Variants
Outline
:badge[Outline]{variant="outline"}
Secondary
:badge[Secondary]{variant="secondary"}
Info
:badge[Info]{type="info"}
Warning
:badge[Warning]{type="warning"}
Success
:badge[Success]{type="success"}
lime
:badge[lime]{type="lime"}
Danger
:badge[Danger]{type="danger"}
Link
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