Vivid API

Badge

A small label, generally appearing inside or in proximity to another larger interface component, representing a status, property, or some other metadata.

Usage

import { registerBanner } from '@vonage/vivid-api';
registerBadge('your-prefix');

Slots

Icon Slot

Use the icon slot to provide an icon. If set, the icon attribute (deprecated) will be ignored.

For informative icons, provide an accessible label using the label attribute on the Icon component.

API Reference

Properties

PropertyTypeDefaultDescription
appearance'filled' | 'duotone' | 'subtle' | 'subtle-light'Sets the badge appearance
connotation'alert' | 'accent' | 'cta' | 'success' | 'warning' | 'information' | 'announcement'Sets the badge connotation
iconTrailingbooleanIndicates the icon affix alignment.
shape'rounded' | 'pill'Sets the badge border-radius
size'normal' | 'expanded'Sets the badge size
textstringSets a text on the badge
PropertyTypeDefaultDescription
appearance'filled' | 'duotone' | 'subtle' | 'subtle-light'Sets the badge appearance
connotation'alert' | 'accent' | 'cta' | 'success' | 'warning' | 'information' | 'announcement'Sets the badge connotation
icon-trailingbooleanIndicates the icon affix alignment.
shape'rounded' | 'pill'Sets the badge border-radius
size'normal' | 'expanded'Sets the badge size
textstringSets a text on the badge

Slots

NameDescription
iconThe preferred way to add an icon to the component.
NameDescription
iconThe preferred way to add an icon to the component.