mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-14 12:14:41 +01:00
64 lines
771 B
Markdown
64 lines
771 B
Markdown
---
|
|
description: Display a short text to represent a status or a category.
|
|
links:
|
|
- label: GitHub
|
|
icon: i-simple-icons-github
|
|
to: https://github.com/nuxtlabs/ui/blob/dev/src/runtime/components/elements/Badge.vue
|
|
---
|
|
|
|
## Usage
|
|
|
|
Use the default slot to set the text of the Badge.
|
|
|
|
::component-card
|
|
---
|
|
code: Badge
|
|
---
|
|
|
|
Badge
|
|
::
|
|
|
|
You can also use the `label` prop:
|
|
|
|
::component-card
|
|
---
|
|
props:
|
|
label: Badge
|
|
---
|
|
::
|
|
|
|
### Style
|
|
|
|
Use the `color` and `variant` props to change the visual style of the Badge.
|
|
|
|
::component-card
|
|
---
|
|
props:
|
|
color: 'primary'
|
|
variant: 'solid'
|
|
---
|
|
|
|
Badge
|
|
::
|
|
|
|
### Size
|
|
|
|
Use the `size` prop to change the size of the Badge.
|
|
|
|
::component-card
|
|
---
|
|
props:
|
|
size: 'sm'
|
|
---
|
|
|
|
Badge
|
|
::
|
|
|
|
## Props
|
|
|
|
:component-props
|
|
|
|
## Preset
|
|
|
|
:component-preset
|