Status bar web component: a thin app bar for the open file, save state, connection and shortcut hints, with text, button and link items.
2.3 KB gzipped
@lit-material/status-bar 1.8.0
Renders on the server
Example
Status bar
A thin bar along the bottom of an app window: the open file, the save state, the connection, a shortcut hint. Items at the start and the
end; on a narrow window it wraps instead of clipping. Tone colours an item, so say the state in words too.
Link @lit-material/tokens/css/index.css once per page for the colour, type and shape tokens. Install guide
API
<lit-material-status-bar>
A thin bar along the bottom of an app window, like an editor's: the open
file, the save state, the connection, a shortcut hint. Items go in the
default slot (the start) or the end slot; on narrow windows the bar
wraps instead of clipping.
Properties
Property
Attribute
Type
Default
Description
label
label
string
""
The region's accessible name. Unset, "Status", translated.
Slots
Slot
Description
default
Items at the start.
end
Items at the end.
CSS parts
Part
Description
bar
The bar.
CSS custom properties
Property
Description
--lit-material-status-bar-height
Minimum height (default 28px).
--lit-material-status-bar-background
Background (default --md-sys-color-surface).
--lit-material-status-bar-color
Text (default --md-sys-color-on-surface-variant).
<lit-material-status-bar-item>
One item in a lit-material-status-bar: plain text, a button (button),
or a link (href). tone colours it and is not colour only: pair it with
words ("Unsaved", "2 conflicts"). An optional icon slot goes before the
text.
Properties
Property
Attribute
Type
Default
Description
button
button
boolean
false
Renders a <button>.
href
href
string
""
Renders a link.
tone
tone
StatusBarTone
"neutral"
Colour of the text; say the state in words too.
description
description
string
""
A longer description (title), e.g. what a button does.