Status

Status indicator web component: an icon and a label coloured by state (ok, warning, error, info, neutral), never colour alone.

  • 1.3 KB gzipped
  • @lit-material/status 0.0.3
  • Renders on the server

Example

Install

npm install @lit-material/status @lit-material/tokens
import "@lit-material/status";

Link @lit-material/tokens/css/index.css once per page for the colour, type and shape tokens. Install guide

API

<lit-material-status>

A status indicator: an icon and a short label, coloured by state. Colour is never the only signal — each state has its own glyph and the label says it in words — so it reads in grayscale, for colour-blind users and in forced-colors mode.

Properties

PropertyAttributeTypeDefaultDescription
statusstatusStatusKind"neutral"ok, warning, error, info or neutral (anything else is neutral).

Slots

SlotDescription
defaultThe label.
iconReplaces the built-in glyph.

CSS parts

PartDescription
statusThe row holding icon and label.
iconThe icon box.

CSS custom properties

PropertyDescription
--lit-material-status-ok-color
--lit-material-status-warning-color
--lit-material-status-error-color
--lit-material-status-info-color
--lit-material-status-neutral-color

Source on GitHub npm