Status
avonni-status
Displays a status indicator that maps a value to a configured state, with an optional icon and label.
Overview
Status is a Lightning Web Component that displays the current state of a record or process from a defined list of states, complete with an icon, label, color, and optional tooltip.
Use it in your own Lightning Web Components to surface a single, glanceable status driven by a list of possible states. You define the states once and bind the active one through the value attribute; the component renders the matching icon and label.
Use Cases
Case status: Show whether a case is Open, In Progress, Resolved, or Escalated.
Approval flows: Indicate the current step of an approval process.
Order pipelines: Display where an order sits in fulfillment.
Task tracking: Reflect the state of a task or to-do item.
Sync indicators: Communicate a record's processing or sync state.
Icon Size Guidelines
xx-small / x-small
Inline status next to dense text or list rows.
small
Compact cards and detail panels.
medium
Default for most layouts.
large
Headers and prominent status displays.
Use Case Examples
Example 1: Case status indicator
Scenario: Show the current status of a support case using a fixed set of states with distinct icons and colors.
Result: A blue clock icon with the label "In Progress" appears; changing value swaps to the matching state.
Example 2: Status with tooltip and right-aligned icon
Scenario: Provide extra context on hover and place the icon after the label.
Result: A green "Resolved" label with the success icon on the right and a tooltip shown on hover.
Specifications
Attributes
icon-position
Position of the icon relative to the label. Valid values include left and right.
String
"left"
icon-size
Size of the icon. Valid values include xx-small, x-small, small, medium, or large.
String
"medium"
states
Array of available state objects. The selected state will be displayed as the current status.
AvonniStatusState[]
—
value
Value of the selected state.
String
—
Styling Hooks
--avonni-status-horizontal-alignment
string
flex-start
--avonni-status-label-font-family
font
—
--avonni-status-label-font-size
length
0.8125rem
--avonni-status-label-font-style
string
normal
--avonni-status-label-font-weight
number
400
--avonni-status-label-line-clamp
number
1
Key Considerations
Value mapping:
valuemust exactly match one state'svalueor nothing is rendered.Colors: The
coloron each state is applied to its icon—use it to reinforce meaning.Tooltips: Add a
tooltipto a state to surface additional context on hover.Single status: The component shows one active state at a time, not a multi-step progress bar.
Best Practice: Keep the
stateslist stable and bindvalueto your record data so the displayed status always reflects the source of truth.
Troubleshooting Common Issues
Nothing displays: Confirm
valuematches thevalueof an entry instates.Icon missing: Verify each state's
iconNameis a valid SLDS icon (e.g.utility:clock).Wrong color: Set the
colorproperty on the relevant state object; it expects a valid CSS color string.If issues persist: Contact our support team at [email protected] for assistance.
Last updated
Was this helpful?
