Appearance
Badge
Basic
100
<script setup lang="ts">
import { DuBadge, DuButton } from 'doggy-ui-v3'
</script>
<template>
<du-badge text="100">
<du-button>A Button</du-button>
</du-badge>
</template>
Color
color
<script setup lang="ts">
import { DuBadge, DuButton } from 'doggy-ui-v3'
</script>
<template>
<du-badge text="color" color="#8d89f5">
<du-button>A Button</du-button>
</du-badge>
</template>
API
Props
| Name | Description | Type | Default |
|---|---|---|---|
| text | badge text | string | - |
| color | customize badge background | string | - |
Slots
| Name | Description |
|---|---|
| default | customize content |