Skip to content
Theme:

Ui3nBadge

Badge component for displaying status indicators, notifications, and counts.

Props

NameTypeDefaultDescription
idstring | undefined

Root element id

dotboolean | undefinedfalse

For simple display as a circle

valuestring | number | undefined""

Text displayed inside the circle

colorstring | undefined"var(--color-bg-button-primary-default)"

Background color

textColorstring | undefined"var(--color-text-button-primary-default)"

Text color

position"right-top" | "right-bottom" | "left-top" | "left-bottom" | undefined"right-top"

Positioning of the circle

Slots

Slot NameScope Props (v-slot)Description
#default

Default slot

Usage Examples

Simple use

Simple use

Dot mode, position 'right-top', default color'

I'm here

Value display

Value display

Display text/numbers inside the badge

Notifications
10

Color customization

Color customization

Custom background and text color

Products
NEW

Position variations

Position variations

All 4 positioning options

Top Right
1
Bottom Right
2
Top Left
3
Bottom Left
4

Standalone badge

Standalone badge

Badge without wrapper element (no default slot)

5
NEW

Overflow value (99+)

Overflow value (99+)

Display '99+' for large counts - typical pattern for notifications

Current count: 95
Notifications
95
Messages
95