Skip to content
This translation may be outdated: the Russian source changed after it was translated.Open the Russian version

CdsStatus

A status is a non-interactive indicator of the state of an object: the request is paid, the document is under review, the payment is overdue. The status prop sets the semantics — the color and the icon — while variant sets the display mode: a prominent filled badge or compact text with a colored icon.

Storybook GitLab Figma
Test coverage: 100% — good coverage
API in specs
8 / 8 props, events, slots and exposed members with a test
Test cases
20 unit · 0 browser
Code coverage
100% lines · 100% branches measured in v4.0.0-alpha.13
A11y (axe)
1 recommendations in 7 stories measured in v4.0.0-alpha.11

For labels with arbitrary palette colors — categories, filters — take CdsTag; for counters and marker dots in the corner of an element — CdsBadge.

Variations ​

Statuses ​

The status prop sets one of the five semantic statuses. Assign the values to the states of the object: info — neutral, progress — the process is running, warning — needs attention, success — success, danger — a problem.

Display mode ​

The variant prop controls how prominent the status is. fill (the default) is a badge with a colored background; it catches the eye in lists and tables. text has no background, a colored status icon and neutral text: the semantics are kept, but the status does not compete with the surrounding content.

A similar "colored icon + text" pair can be assembled by hand — from CdsIcon with the color prop and text next to it. That way you are free to pick the icon and the color; variant="text", on the other hand, guarantees that the icon and the color always match the semantics of the status.

Indicator ​

The indicator prop puts a dot in the status color before the text. The status reads more compactly and fits dense lists well. With variant="text" the dot replaces the icon.

Pulse ​

The pulse prop makes the dot pulse and works only together with indicator. Enable it where a process is running right now: a check, an upload, a sync. Finished and static states do not need it — endless motion distracts (WCAG 2.2.2). Under prefers-reduced-motion the pulse is turned off.

Status change ​

When the status changes, the color of the fill, the text and the dot transitions smoothly, without a jump.

Text ​

The text comes from the text prop. When you need markup — emphasis, non-breaking spaces — use the default slot: it replaces the text from the prop.

Guidelines ​

Scenarios ​

Statuses of records in a list ​

In lists and tables a fill badge shows the state of a record at first glance. Keep the vocabulary of statuses short and consistent across the whole section — then the column can be scanned by color, without reading it.

Tracking a process ​

The status reflects the course of an asynchronous process: after being sent for review the object moves to progress, and once it is done — to success. The user sees the current state without reloading the page.

A status in a details block ​

In a dense info block — an invoice card, a panel of details — the fill background pulls attention away. The text variant sits in line with the rest of the data: the colored icon keeps the semantics, and the text stays neutral.

API ​

Props

NameTypeDefaultDescription
contentstring | number | undefined—Content displayed in the component.
indicatorboolean | undefined—A dot in the status color before the text. With variant="text" it replaces the icon.
pulseboolean | undefined—Pulse of the dot. Works only together with indicator. Enable it only where a process is running right now: endless motion distracts and, per WCAG 2.2.2, should not accompany static states. Not animated under prefers-reduced-motion.
status"progress" | "danger" | "success" | "warning" | "info" | undefined'info'Semantic status — drives the color and the default icon.
textstring | number | undefined—Text displayed in the component.
themestring | undefined—Component theme
variant"fill" | "text" | undefined'fill'Display mode: fill — a filled badge without an icon; text — a transparent background with a colored status icon.

Slots

NameTypeDescription
defaultanySlot for the status text.