On this page
@addTagHelper *, Webority.Ui.RazorTones
Keep one tone per state, so a status reads the same wherever it appears.
Empty state
With no label the badge draws a hyphen, the placeholder for an empty table cell.
Long labels
A long label grows the pill rather than truncating, so keep it to a word or two.
Extra classes
Add a class for analytics or layout; it is appended after the tone class, never replacing it.
Every option
Every value of every prop, one cell each.
tone: every semantic value
tone="success"
tone="warning"
tone="danger"
tone="info"
tone="primary"
tone="neutral" (default)
label
(omitted) → hyphenlabel={null}: React only, Razor omits the attributelabel="" → hypheninner content: Razor has no ReactNode label, but child markup composes the same way
long label: no truncation, the pill growsstatus: one value from a map
status="Monday"status="Tuesday"status="Wednesday"status="Thursday"status="Friday"status="Saturday"status="Sunday"bordered: off and on
(omitted) (default)bordered="true"className or class: appended, not replaced
class="analytics-pill"tooltip: text
tooltip="Shown on hover and focus"tooltip placement: all five
tooltip-placement="auto" (default)
tooltip-placement="top"
tooltip-placement="bottom"
tooltip-placement="start"
tooltip-placement="end"
other attributes: passed to the span
data-status="active": any other attribute reaches the spanGuidance
What to do, and what to avoid.
Use it when
- You are showing where a record stands, a lifecycle or workflow status.
- A table has a status column that should read consistently down the list.
- You are mapping a status enum to a coloured pill.
Reach for something else when
- You are showing a count or a short static label. → AppBadge
- The token should be removable (a filter or tag). → AppChip
- The user is picking one option from a set. → AppChoiceChip
- It is a persistent inline message. → AppAlert
One consistent tone per status
Each status maps to a consistent, meaningful tone: the colour reinforces the word.
One tone for every status throws away the signal: the colour tells the user nothing.
Pill holds one or two words
A single, concise status word, instantly scannable.
A pill is not a place for a sentence: keep the status to a word or two and explain elsewhere.
Reference
Try every prop, read the full list, and check keyboard and screen reader behaviour.
7 props. The 5 most used come first.
Used on most screens 5 props
| Prop | Type | Default | Description |
|---|---|---|---|
| labeldefault - | string | - | The status text. Omit (or pass empty) to render a hyphen. |
| tonedefault neutral | string | neutral | The tone class suffix: neutral, primary, success, warning, danger or info. |
| tooltipdefault - | string | - | A hover and focus tooltip that flips to stay on screen. Use it to spell out a terse status. |
| tooltip-placementdefault auto | auto | top | bottom | start | end | auto | The preferred tooltip side. Auto picks the side with the most room. |
| bordereddefault false | bool | false | Draws a 1px border in the tone's own colour, so the pill stands off a white row. |
Less common 2 props
| Prop | Type | Default | Description |
|---|---|---|---|
| statusdefault - | StatusDisplay | - | Label and tone as one value, usually from a StatusDisplayMap. Never set with label or tone. |
| classdefault - | string | - | Not a bound tag-helper property: an ordinary HTML class attribute on <app-status-badge> is preserved and appended after the tone class. |
Screen reader
3 notes- The status is real text in a span, so the word carries the meaning and the colour only reinforces it.
- With no label the badge draws a plain hyphen instead of an empty pill.
- A tooltip, when set, opens on hover and on keyboard focus and flips to stay on screen.
Do and avoid
2 pairsOne consistent tone per status
Each status maps to a consistent, meaningful tone: the colour reinforces the word.
One tone for every status throws away the signal: the colour tells the user nothing.
Pill holds one or two words
A single, concise status word, instantly scannable.
A pill is not a place for a sentence: keep the status to a word or two and explain elsewhere.