Status badge
Shows the processing status of a task, document or case with an icon and a text label picked from the backend status code.
Processando
status
<StatusBadge status="processing" />Which one to use
Badge, Tag, Chip and Status badge look alike. They answer different questions.
| Component | What it is | Interactive | Example |
|---|---|---|---|
| Status badge (this page) | A processing status. You pass the backend code. | No | “Processando” with an icon. |
| Badge | A small label, always the sm size. Wraps Tag. |
No | “Novo” next to a menu item. |
| Tag | A label in three sizes, with an optional icon. | No | “Aprovado” with a check icon. |
| Chip | An applied filter or selected value you can remove. | Yes | “Revisor: Marina Costa” with ×. |
Pick Status badge when the text comes from a backend status code (processing, error, manually_reviewed). Pick Tag when you choose the text and color yourself.
When to use
- To show the status of a task, document, case or execution that comes from the backend.
- Wherever the same status must look identical across lists and detail pages.
When not to use
- A label you write yourself. Use Tag or Badge.
- A filter or selected value. Use Chip.
- A message about the page. Use Alert.
- A running process with progress. Use Progress or Loader.
Statuses
The status code picks the color, the icon and the default label. Codes not listed here get no color class and the CircleCheck icon.
Em andamento (alerta, ícone de carregamento)
Pendente
Processando
Reprocessando
Precisa de feedback
Aguardando (neutro, ícone de relógio)
Aguardando subsídios
Rejeitado
Pronto para a próxima etapa (informação, ícone de info)
Pronto para gerar
Processando
Revisado (sucesso, ícone de check)
Revisado
Falha (crítico, ícone de alerta)
Erro
Atrasado
Falha no processamento
Cancelado
Precisa de ação (alerta, ícone de círculo)
Classificar documentos
Concluído (sem cor, ícone de check)
Concluído
Sucesso
| Group | Look | Icon | Example codes |
|---|---|---|---|
| In progress | Warning | Loader | pending, processing, retrying_jobs, needs_feedback |
| Waiting | Neutral | Clock | waiting_for_subsidies, rejected |
| Ready | Information | Info | ready_for_generate_execution, running |
| Reviewed | Success | Check circle | manually_reviewed |
| Done | No color | Check circle | done, success, unprocessable |
| Failed | Critical | Octagon alert | error, late, processing_failed, cancelled |
| Needs action | Warning | Alert circle | needs_labeling |
Custom label
Some codes have no default label (for example waiting_for_subsidies). Pass customLabel with text from the app.
Aguardando subsídios
Examples
Concluído
Content
- Use the default label when there is one. It keeps the status consistent across the product.
- A
customLabelnames the state in one or two words: “Aguardando subsídios”. - Sentence case, no period.
Do and don’t
Erro
Concluído
Accessibility
- Status colors are never the only signal. Each group pairs a color with an icon and a text label: warning with a loader, critical with an octagon alert, success with a check, information with an info icon, waiting with a clock.
- Keep
hideIconasfalsein lists where users scan for failures. Without the icon, only the color and the word remain. - It renders a static
divthrough Badge. It has no role and is not focusable. Do not use it as a button. - Status changes are not announced. If a status changes while the user watches, announce it with a live region next to it.
- Contrast: check the text colors in Light, Dark and Darker. See Known issues.
Code
import { StatusBadge } from "@repo/ui/status-badge";
<StatusBadge status="processing" />
<StatusBadge customLabel="Aguardando subsídios" status="waiting_for_subsidies" />
Props
| Prop | Type | Default | Description |
|---|---|---|---|
customLabel | string | — | Replaces the default label. Required for status codes without a default label |
hideIcon | boolean | false | Hides the status icon. Keep it visible so the status is not conveyed by color alone |
status | "pending" | "processing" | "retrying_jobs" | "needs_feedback" | "waiting_for_subsidies" | "rejected" | "ready_for_generate_execution" | "running" | "manually_reviewed" | "error" | "late" | "processing_failed" | "cancelled" | "needs_labeling" | "done" | "success" | — | Backend status code. It picks the color, the icon and the default label |
Known issues
| Issue | Effect |
|---|---|
statusLabel holds Portuguese strings inside the package. |
The package is meant to be i18n-free. Apps cannot translate the default labels. Pass customLabel from next-intl. |
Status codes without a default label (waiting_for_subsidies, ready_for_generate_execution, many processing_*) render an empty label. |
The badge shows an icon with no text unless customLabel is passed. |
Colors use translucent fills (bg-warning/20, bg-red-400/10, bg-disabled/80) and palette classes (text-yellow-800, text-green-800, text-red-800, text-talismanBlue-800). |
Backgrounds blend with the surface behind them. Text colors do not follow the semantic tokens or the themes. |
The class string is built as `${classes} ${className}`. |
Without className, the literal word undefined is added to the class list. |
The icon has no aria-hidden. |
Depends on the icon library to hide it from screen readers. |
rejected is styled as a waiting status (neutral fill, clock icon) but its label is “Rejeitado”. |
A rejection looks idle, not like a failure, so it is easy to miss in a list. |