Badge
Numeric indicators, dots, statuses and ribbons: overflow, offset, topics and notifications.
When to use
Badge shows low quantity, updates or status near the item. It is suitable for unread messages, tasks and service status. BadgeRibbon adds a ribbon to a card. Color should be accompanied by text if it makes sense.
Number, point and status
count accepts a number, string or snippet. The number is limited by overflowCount, default is 99; displaying 99+ does not change the original quantity. Zero is hidden until showZero is enabled.
| Problem | Setting | Example |
|---|---|---|
| Show number and explicit zero | count, showZero |
Main counter |
| Print a number without an object | without children |
Separate indicator |
| Limit long number | overflowCount |
Display limit |
| Mark new events | dot |
Dot |
| Sign State | status, text |
Statuses |
| Add feed | BadgeRibbon |
Card strips |
dot replaces a number with a dot; numeric count=0 also hides it. status selects success/processing/default/error/warning, color sets its own color. text explains the meaning of the state. size changes the normal or small indicator.
Content Linking and Accessibility
With children, the indicator is located near the nested object; without children participates in the normal flow. offset shifts the indicator itself in X/Y, maintaining the position of the content. String values have parsing features described in the API; for a simple offset, use a number pair.
Children-snippet receives count and descriptionId. count remains a number for numeric input only: string and snippet are not automatically converted. descriptionId allows you to associate a button with a quantity description via aria-describedby, as in dynamic example.
For your own count-snippet, apply the resulting class and style to its root. Otherwise, the offset and semantic design will be lost. title specifies a native tooltip; null/false remove it. The tooltip does not replace the available button name or text explanation of the status.
Badge by itself does not create a link: the interactivity is in children. Keep the href and keyboard of the nested control.
Ribbon and theme
BadgeRibbon is exported separately. text is the content of the feed, children is the card being designed, placement:start/end follows the direction of the interface. class/style refers to the feed, semantic root refers to the outer wrapper of the content.
ConfigProvider.badge and ConfigProvider.ribbon are configured independently. classNames/styles support root/indicator for Badge and root/content/indicator for ribbon; styles contains CSS strings. Badge component design tokens control counter height, point, and typography. Native refs are available via bind:nativeElement.
A non-empty local prefixCls changes Badge classes; the empty string and undefined inherit ConfigProvider.prefixCls with the -badge suffix. ScrollNumber separately enables scrollNumberPrefixCls, otherwise it uses a common prefix with the suffix -scroll-number. Local Badge.prefixCls does not rename numbers. CSS ScrollNumber is bound to the global prefix, not the local scrollNumberPrefixCls. BadgeRibbon inherits the -ribbon suffix; its local prefixCls changes DOM classes, and the CSS geometry follows the global prefix. Example ConfigProvider shows inheritance and local Badge exception.
Examples
Counter and zero value
Zero is hidden by default; showZero leaves it visible. Snippet defines its own indicator.
<script lang="ts">
import { Avatar, Badge, Flex } from '@woodger/antd';
</script>
{#snippet clock({ class: className, style }: { class: string; style: string | undefined })}
<span
class={className}
{style}
aria-label={("Waiting")}
><svg
viewBox="0 0 16 16"
width="16"
height="16"
fill="none"
stroke="currentColor"
aria-hidden="true"
><circle
cx="8"
cy="8"
r="6"
/><path
d="M8 4v4l3 2"
/></svg></span>
{/snippet}
<Flex align="center" wrap gap={28}>
<Badge count={5}>
<Avatar shape="square" alt={("Anna, 5 notifications")}>
{("AN")}
</Avatar>
</Badge>
<Badge count={0}>
<Avatar shape="square" alt={("No notifications")}>
{("Sun")}
</Avatar>
</Badge>
<Badge count={0} showZero>
<Avatar shape="square" alt={("Show zero")}>
{("TO")}
</Avatar>
</Badge>
<Badge
count={clock}
><Avatar
shape="square"
alt={("Waiting")}
>{("EU")}</Avatar></Badge>
</Flex>
Self Badge
Without children, the counter is in the normal page flow.
<script lang="ts">
import { Badge, Flex, Switch } from '@woodger/antd';
let visible = $state(true);
</script>
<Flex align="center" wrap gap={16}>
<Switch
bind:checked={visible}
aria-label={("Show independent counters")}
/>
<Badge count={visible ? 11 : 0} color="gold" />
<Badge count={visible ? 25 : 0} />
<Badge count={visible ? 100 : 0} color="#23734a" />
</Flex>
Limit value
The number above overflowCount is displayed with a plus; the original value is retained in the description.
<script lang="ts">
import { Avatar, Badge, Flex } from '@woodger/antd';
</script>
<Flex align="center" wrap gap={28}>
{#each [{ count: 99, limit: 99 }, { count: 100, limit: 99 }, { count: 11, limit: 10 }, {
count: 1000,
limit: 999
}] as example}
<Badge count={example.count} overflowCount={example.limit}>
<Avatar shape="square" alt={("" + String((example.count)) + " notifications")}>{("A")}</Avatar>
</Badge>
{/each}
</Flex>
Dot instead of number
dot indicates the presence of updates. The numeric count=0 hides the point.
<script lang="ts">
import { Avatar, Badge, Flex } from '@woodger/antd';
</script>
<Flex align="center" wrap gap={28}>
<Badge dot><Avatar alt={("There are updates")}>{("AN")}</Avatar></Badge>
<Badge
dot
count={0}
><Avatar
alt={("No updates")}
>{("Sun")}</Avatar></Badge>
<Badge dot><span>{("New version")}</span></Badge>
</Flex>
Quantity: 5. Open: 0.
Changing the counter
Buttons change the quantity, Switch replaces the number with a dot. The available description is attached to the button via children Snippet.
<script lang="ts">
import { Badge, Button, Flex, Switch } from '@woodger/antd';
let count = $state(5);
let dot = $state(false);
let opened = $state(0);
</script>
<Flex align="center" wrap gap={16}>
<Badge {count} {dot} showZero>
{#snippet children({ descriptionId })}<Button aria-describedby={descriptionId} onclick={() => {
opened++;
}}>{("Notifications")}</Button>{/snippet}
</Badge>
<Button aria-label={("Decrease counter")} disabled={count === 0} onclick={() => {
count--;
}}>−</Button>
<Button aria-label={("Increase counter")} onclick={() => { count++; }}>+</Button>
<Switch bind:checked={dot} aria-label={("Replace the counter with a point")} />
</Flex>
<p
role="status"
aria-label={("Counter status")}
>{("Quantity: ")}{count}{(". Open: ")}{opened}.</p>
Unread messages: 5.
Counter at the link
The link saves the real href and is opened from the keyboard.
<script lang="ts">
import { Badge } from '@woodger/antd';
</script>
<Badge count={5}>
{#snippet children({ descriptionId })}<a
href={("#badge-notifications")}
aria-describedby={descriptionId}
>{("Open messages")}</a>{/snippet}
</Badge>
<p id="badge-notifications">{("Unread messages: 5.")}</p>
Indicator offset
offset sets the X and Y offset without changing the position of the content.
<script lang="ts">
import { Avatar, Badge, Flex, InputNumber } from '@woodger/antd';
let x = $state<number | null>(10);
let y = $state<number | null>(10);
</script>
<style>
.fields {
display: flex;
flex-wrap: wrap;
align-items: flex-end;
gap: 16px;
margin-bottom: 24px;
}
label {
display: flex;
flex-direction: column;
gap: 8px;
max-width: 100%;
}
</style>
<div class="fields">
<label>{("Offset X")}<InputNumber aria-label={("X indicator offset")} bind:value={x} /></label>
<label>{("Y offset")}<InputNumber aria-label={("Y indicator offset")} bind:value={y} /></label>
</div>
<Flex
align="center"
gap={16}
><Badge
id="badge-offset"
count={5}
offset={[x ?? 0, y ?? 0]}
><Avatar
shape="square"
alt={("Offset counter")}
>{("AN")}</Avatar></Badge></Flex>
Indicator dimensions
Regular and small meters, including independent ones.
<script lang="ts">
import { Avatar, Badge, Flex } from '@woodger/antd';
</script>
<Flex align="center" wrap gap={28}>
<Badge count={5}>
<Avatar shape="square" alt={("Regular counter")}>
{("AN")}
</Avatar>
</Badge>
<Badge
count={5}
size="small"
><Avatar
shape="square"
alt={("Small counter")}
>{("Sun")}</Avatar></Badge>
<Badge count={25} /><Badge count={25} size="small" />
</Flex>
States
Five statuses; the text explains the meaning of the color.
<script lang="ts">
import { Badge, Flex, type BadgeStatus } from '@woodger/antd';
const states: { status: BadgeStatus; text: string }[] = [
{ status: 'success', text: "Ready" }, { status: 'processing', text: "At work" },
{ status: 'default', text: "Not running" }, { status: 'error', text: "Error" },
{ status: 'warning', text: "Needs attention" }
];
</script>
<Flex vertical gap={12}>{#each states as state}<Badge {...state} />{/each}</Flex>
Palette and custom colors
Named colors and custom CSS colors with explanatory text.
<script lang="ts">
import { Badge, Flex } from '@woodger/antd';
const colors = [
'pink',
'red',
'yellow',
'orange',
'cyan',
'green',
'blue',
'purple',
'geekblue',
'magenta',
'volcano',
'gold',
'lime'
];
</script>
<Flex vertical gap={12}>
{#each colors as color}<Badge {color} text={(color)} />{/each}
<Badge
color="#23734a"
text={("#23734a")}
/><Badge
color="rgb(173,78,0)"
text={("rgb(173,78,0)")}
/>
</Flex>
Tape at the end of the line.
Tape at the beginning of the line.
Start of line on the right.
<script lang="ts">
import { BadgeRibbon, Card, ConfigProvider } from '@woodger/antd';
</script>
<style>
.ribbons {
display: grid;
gap: 24px;
}
p {
margin: 0;
}
</style>
<div class="ribbons">
<BadgeRibbon text={("Recommended")} color="green"><Card size="small" styles={{
body: 'padding-top:40px'
}}><p>{("Tape at the end of the line.")}</p></Card></BadgeRibbon>
<BadgeRibbon
text={("New")}
color="#ad4e00"
placement="start"
><Card
size="small"
styles={{ body: 'padding-top:40px' }}
><p>{("Tape at the beginning of the line.")}</p></Card></BadgeRibbon>
<ConfigProvider
direction="rtl"
><BadgeRibbon
text={("RTL")}
placement="start"
><Card
size="small"
styles={{ body: 'padding-top:40px' }}
><p>{("Start of line on the right.")}</p></Card></BadgeRibbon></ConfigProvider>
</div>
Semantic DOM
styles for root/indicator and root/content/indicator; CSS values are given by strings.
<script lang="ts">
import { Avatar, Badge, BadgeRibbon, Card, Flex } from '@woodger/antd';
</script>
<Flex vertical gap={24}>
<div>
<Badge count={12} styles={({ props }) => ({
indicator:
`
background: ${props.count === 12
? '#23734a'
: '#ad4e00'};
box-shadow: 0 0 0 3px var(--ant-color-bg-container);
`
})}>
<Avatar shape="square" alt={("Anna, 12 notifications")}>
{("AN")}
</Avatar>
</Badge>
</div>
<BadgeRibbon text={("Own style")} color="#722ed1" styles={{
content: 'font-weight:700',
indicator: 'box-shadow:0 2px 6px #0002',
root: `
padding: 8px;
border: 1px dashed var(--ant-color-border);
`
}}><Card size="small" styles={{
body: 'padding-top:40px'
}}>{("Feed content.")}</Card></BadgeRibbon>
</Flex>
Local topic
Badge tokens change height and point only inside the ConfigProvider. The ribbon setting is responsible for ribbons.
<script lang="ts">
import { Avatar, Badge, BadgeRibbon, Card, ConfigProvider, Flex } from '@woodger/antd';
</script>
<ConfigProvider badge={{ styles: { indicator: 'background:#23734a' } }} ribbon={{
styles: {
content: 'font-weight:700'
}
}} theme={{ components: { Badge: { indicatorHeight: 24, dotSize: 9, textFontSize: 13 } } }}>
<Flex vertical gap={24}>
<Flex align="center" gap={32}><Badge id="badge-token-height" count={7}>
<Avatar alt={("Large indicator")}>
{("AN")}
</Avatar>
</Badge><Badge dot>
<Avatar alt={("Large dot")}>
{("Sun")}
</Avatar>
</Badge></Flex>
<BadgeRibbon text={("Local topic")} color="green"><Card size="small" styles={{
body: 'padding-top:40px'
}}>{("General ribbon settings.")}</Card></BadgeRibbon>
</Flex>
</ConfigProvider>
Notifications
Unread: 2. Total messages: 3.
Project Notifications
Saved example: settings, adding messages, reading and Drawer.
<script lang="ts">
import { onDestroy, tick } from 'svelte';
import {
Badge,
Button,
Checkbox,
Drawer,
Input,
InputNumber,
Select,
type BadgeColor,
type BadgeContext,
type BadgeSize,
type BadgeStatus
} from '@woodger/antd';
import { createBadgeInbox } from './badge-inbox.model.svelte';
const model = createBadgeInbox();
const statuses: BadgeStatus[] = ['success', 'processing', 'default', 'error', 'warning'];
const colors: BadgeColor[] = [
'blue',
'purple',
'cyan',
'green',
'magenta',
'pink',
'red',
'orange',
'yellow',
'volcano',
'geekblue',
'lime',
'gold'
];
let mode = $state<'count' | 'dot' | 'status'>('count');
let count = $state<number | null>(5);
let overflow = $state<number | null>(99);
let showZero = $state(false);
let standalone = $state(false);
let size = $state<Exclude<BadgeSize, 'default'>>('medium');
let color = $state<BadgeColor | 'auto'>('auto');
let status = $state<BadgeStatus>('processing');
let text = $state<string | undefined>(("Service status"));
let rich = $state(false);
let offsetX = $state<number | null>(0);
let offsetY = $state<number | null>(0);
let clicks = $state(0);
let open = $state(false);
let active = true;
let action = 0;
let list = $state<HTMLDivElement>();
let inboxDot = $state(false);
onDestroy(() => {
active = false;
action++;
});
async function read(key?: number) {
const changed = key === undefined
? model.readAll() > 0
: model.markRead(key);
if (!changed) {
return;
}
const token = ++action;
await tick();
if (!active || token !== action || !open) {
return;
}
(
key === undefined
? list
: document.getElementById(`badge-message-${key}`)
)
?.focus({ preventScroll: true });
}
function reset() {
action++;
open = false;
model.reset();
}
</script>
<style>
.controls,
.examples {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 16px;
min-width: 0;
}
.controls + .controls { margin-top: 16px; }
.fields { align-items: flex-end; }
.field {
width: 160px;
max-width: 100%;
}
.field label {
display: block;
margin-bottom: 8px;
}
.wide {
width: 250px;
max-width: 100%;
}
.preview {
margin-block: 24px;
padding: 32px;
border: 1px solid var(--ant-color-border-secondary);
border-radius: var(--ant-border-radius-lg);
}
.examples {
margin-block: 24px;
gap: 24px;
}
.inbox {
padding: 16px;
border: 1px solid var(--ant-color-border-secondary);
border-radius: var(--ant-border-radius-lg);
}
.controls :global(.ant-btn) {
max-width: 100%;
height: auto;
min-height: var(--ant-control-height);
white-space: normal;
}
.messages { padding-inline-start: 24px; }
.message {
padding-block: 16px;
overflow-wrap: anywhere;
}
.message + .message { border-top: 1px solid var(--ant-color-border-secondary); }
.message:focus-visible,
.list:focus-visible {
outline: 2px solid var(--ant-color-primary);
outline-offset: 2px;
}
.message h3 {
margin-block: 0 8px;
font-size: var(--ant-font-size-lg);
}
.message p { margin-block: 8px; }
.message :global(.ant-btn) {
max-width: 100%;
height: auto;
min-height: var(--ant-control-height);
white-space: normal;
}
.controls :global(.ant-btn-sm),
.message :global(.ant-btn-sm) {
min-height: var(--ant-control-height-sm);
}
.controls :global(.ant-btn-lg),
.message :global(.ant-btn-lg) {
min-height: var(--ant-control-height-lg);
}
.summary { color: var(--ant-color-text-secondary); }
output {
display: block;
color: var(--ant-color-text-secondary);
}
</style>
{#snippet previewTarget(context: BadgeContext)}<Button
aria-describedby={context.descriptionId}
onclick={() => { clicks++; }}
>{("Button with Badge")}</Button>{/snippet}
{#snippet richText()}<strong>{text}</strong>{/snippet}
<div class="controls fields"><div class="field"><Select
aria-label={("Badge Mode")}
bind:value={mode}
options={([
{ value: 'count', label: "Counter" },
{ value: 'dot', label: "Point" },
{ value: 'status', label: "Status" }
])}
/></div><div
class="field"
><label
for="badge-example-count"
>{("Badge quantity")}</label><InputNumber
id="badge-example-count"
bind:value={count}
min={0}
disabled={mode === 'status'}
/></div><div
class="field"
><label
for="badge-example-overflow"
>{("Badge Limit")}</label><InputNumber
id="badge-example-overflow"
bind:value={overflow}
min={0}
/></div><div
class="field"
><Select
aria-label={("Badge Size")}
bind:value={size}
options={([{ value: 'medium', label: 'medium' }, {
value: 'small',
label: 'small'
}])}
/></div><div
class="field"
><Select
aria-label={("Color Badge")}
bind:value={color}
options={(['auto', ...colors].map(value => ({
value: value as BadgeColor | 'auto',
label: value
})))}
/></div></div>
<div class="controls fields"><Checkbox bind:checked={showZero}>
{("Show zero Badge")}
</Checkbox><Checkbox
bind:checked={standalone}
disabled={mode === 'status'}
>{("Separate Badge")}</Checkbox><div
class="field"
><Select
aria-label={("Status Badge")}
bind:value={status}
disabled={mode !== 'status'}
options={(statuses.map(value => ({ value, label: value })))}
/></div><div
class="wide"
><Input
aria-label={("Badge status text")}
bind:value={text}
disabled={mode !== 'status'}
/></div><Checkbox
bind:checked={rich}
disabled={mode !== 'status'}
>{("Badge Status Snippet")}</Checkbox><div
class="field"
><label
for="badge-example-x"
>{("Badge X Offset")}</label><InputNumber
id="badge-example-x"
bind:value={offsetX}
/></div><div
class="field"
><label
for="badge-example-y"
>{("Badge Y offset")}</label><InputNumber
id="badge-example-y"
bind:value={offsetY}
/></div></div>
<div class="preview"><Badge
id="showcase-badge-preview"
count={mode === 'status' ? undefined : count ?? undefined}
overflowCount={overflow ?? undefined}
dot={mode === 'dot'}
status={mode === 'status' ? status : undefined}
color={color === 'auto' ? undefined : color}
text={mode === 'status' ? rich ? richText : text : undefined}
{size}
{showZero}
offset={[offsetX ?? 0, offsetY ?? 0]}
children={mode === 'status' || standalone ? undefined : previewTarget}
aria-label={("Preview Badge")}
/></div>
<div class="examples" aria-label={("Badge Statuses")}>{#each statuses as value}<Badge
status={value}
text={(value)}
/>{/each}</div>
<output
aria-label={("Clicks in the Badge example")}
>{("Presses: ")}{clicks}.</output>
<h3>{("Notifications")}</h3>
<div class="controls inbox"><Badge
id="showcase-badge-inbox"
count={model.unreadCount}
dot={inboxDot}
>{#snippet children({ descriptionId })}<Button
type="primary"
aria-describedby={descriptionId}
onclick={() => { open = true; }}
>{("Open notifications Badge")}</Button>{/snippet}</Badge><Button
onclick={() => model.add()}
>{("New notice")}</Button><Button
onclick={() => model.addBatch()}
>{("Add 100 notifications")}</Button><Button
onclick={reset}
>{("Reset example Badge")}</Button><Checkbox
bind:checked={inboxDot}
>{("Dot instead of number of notifications")}</Checkbox></div>
<p class="summary">{("Unread: ")}{(model.unreadCount)}{(". Total messages: ")}{(model.messages.length)}.</p>
<Drawer bind:open title={("Notifications Badge")}>
<div class="controls"><Button
type="primary"
disabled={!model.unreadCount}
onclick={() => { void read(); }}
>{("Read all notifications")}</Button><Button
onclick={() => model.add()}
>{("Add notification to Drawer")}</Button></div>
<div
bind:this={list}
class="list"
role="region"
aria-label={("List of Badge notifications")}
tabindex="-1"
><p>{("Unread: ")}{(model.unreadCount)}.</p><ul
class="messages"
>{#each model.messages as message (message.key)}<li
id={`badge-message-${message.key}`}
class="message"
tabindex="-1"
><h3>{(message.title)}</h3><Badge
status={message.read ? 'default' : 'warning'}
text={(message.read ? "Read" : "Not read")}
/><p>{(message.body)}</p><Button
disabled={message.read}
onclick={() => { void read(message.key); }}
>{("Read «")}{(message.title)}»</Button></li>{/each}</ul></div>
</Drawer>
API
Examples are checked against the current ant.design page and the public API of the installed package. Full definitions of Props are in @woodger/antd.
| Theme | Example or limitation |
|---|---|
| Basic | Number, showZero and an arbitrary indicator. |
| Standalone | No child content. |
| Overflow Count | Different overflow thresholds. |
| Red badge | Point and zero value. |
| Dynamic | Controlled counter and dot switching. |
| Clickable | This link with description. |
| Offset | Variable X/Y. |
| Size | medium/small. |
| Status | All five statuses. |
| Colorful Badge | Named palette and CSS colors. |
| Ribbon | Tape, placement and RTL. |
| Custom semantic dom styling | Badge and BadgeRibbon. |
| Property | Description | Type | Default |
|---|---|---|---|
scrollNumberPrefixCls | Classes ScrollNumber and its digits, independent of Badge.prefixCls. The empty string inherits the common prefix. CSS ScrollNumber follows a global prefix, not this local prop. | string | ConfigProvider + -scroll-number |
prefixCls | Full local CSS prefix for root and Badge indicator; ScrollNumber is resolved separately. The empty string and undefined inherit ConfigProvider.prefixCls; default ant-badge. | string | ConfigProvider + -badge |
count | Number, string or Snippet with class/style for the indicator root. | BadgeCount | — |
overflowCount | Display threshold N+. | number | 99 |
showZero | Show zero counter. | boolean | false |
dot | Dot instead of number. | boolean | false |
status | success, processing, default, error, warning. | BadgeStatus | — |
color | Named or custom CSS color. | string | — |
text | Label of status or colored dot. | BadgeText | — |
size | Size of the numeric indicator. | medium | small | medium |
offset | Shift of the indicator along X/Y. | [number | string, number | string] | — |
title | Native tooltip; false/null disables it. | string | false | null | number |
children | descriptionId associates interactive content with the counter. | Snippet<[BadgeContext]> | — |
styles | CSS lines for root/indicator, record or callback. | BadgeSemantic | — |
classNames | Classes for root/indicator. | BadgeSemantic | — |
nativeElement | bind:nativeElement instead of ref. | HTMLSpanElement | — |
BadgeRibbon
text and children accept a string, number or Snippet. color sets the color of the ribbon; placement - start/end, end by default. styles and classNames support record or callback with props.
prefixCls changes Ribbon DOM classes. The empty string and undefined inherit ConfigProvider.prefixCls + -ribbon, default ant-ribbon. Ribbon geometry CSS follows the general provider prefix, regardless of the local prop; For point-by-point styling, use semantic styles.
Semantic DOM
Badge contains root and indicator. BadgeRibbon: root - content wrapper, indicator - tape, content - its text. Ribbon's regular class/style refers to the ribbon, not the entire card.
For a button or link use children Snippet with descriptionId and aria-describedby. Color and dot alone do not explain the condition; add text. Badge does not turn the content into a button.
Registration tokens
theme.components.Badge customizes indicator sizes and typography. ConfigProvider.badge and ConfigProvider.ribbon define local classes and semantic styles; The component's own settings take precedence.
| Token | Purpose |
|---|---|
dotSize | Point diameter. |
indicatorHeight | Height of a conventional counter. |
indicatorHeightSM | Height of small counter. |
indicatorZIndex | Indicator layer. |
paddingInline | Horizontal text indents. |
statusSize | Diameter of status point. |
textFontSize | Text size. |
textFontSizeSM | Small indicator text. |
textFontWeight | Text saturation. |
| Token | Current value |
|---|---|
colorError | #ff4d4f |
colorSuccess | #52c41a |
colorWarning | #faad14 |
colorText | rgba(0,0,0,0.88) |
colorTextLightSolid | #fff |
colorBorderBg | #ffffff |
fontSize | 14 |
lineHeight | 1.5714285714285714 |
FAQ
Why is zero visible?
Zero is hidden by default. Add showZero. dot with numeric count=0 is also hidden.
How to replace an indicator with your own content?
Pass count-snippet and transfer the resulting class/style to its root. The number of children contexts from such a snippet is not calculated.
How to use Badge.Ribbon in Svelte?
Import BadgeRibbon. The content is specified by values or snippets, semantic styles - by CSS strings.