Statusbar
The footer status strip: a compact, monospace row of status items separated by flexible spacers.
Live demo
Statusbar is the thin strip that lives along the bottom of an app shell, reporting ambient state: cursor position, encoding, branch, sync status, build result. It is a flex row of item parts you space apart with one or more spacer parts that absorb the slack, so groups push to the left and right edges.
The default treatment is small monospace ink at low contrast; an item--strong modifier lifts a single item to full-contrast foreground for the one fact that matters most. A live flag turns the bar into an aria-live region so screen readers announce status changes as they happen; ideal for build, sync, or save indicators that update in place. Under overflow="collapse" it measures the row with a ResizeObserver, ranks items by data-priority (a data-required item never drops), and folds the lowest-priority ones into a +N popover until the row fits; by default it clones the dropped items into a shadow popover, which is right for plain text/token cells, though a clone can't carry light-DOM styles or event handlers, so set manual-overflow for styled/interactive cells. Whenever the dropped set changes, collapse fires an overflow-change CustomEvent (bubbles, composed, deduped against the last emit) whose detail carries the actual slotted light-DOM cell elements ({ hidden: HTMLElement[]; visible: HTMLElement[] }) so a consumer knows exactly which of its own cells dropped and can render them itself with their original styles and handlers intact.
When to use
How this component composes with the rest of the set.
Props
7 props, straight from the manifest.
| Prop | Type | Default | Bindings | Description |
|---|---|---|---|---|
Appearance
Variants
item-strong
Lifts a single item to full-contrast foreground and medium weight for emphasis.
States
item-focus-visible
Keyboard focus on an interactive item: a token-colored ring, plus a transparent outline that becomes real in forced-colors mode.
Anatomy
The named parts that make up the component, with their selectors.
statusbar
The footer strip, a flex row carrying the monospace status items.
item
A single status entry: an inline group of label text and any inline graphic.
spacer
A flexible gap that absorbs free space, pushing items to opposite edges.
overflow
The +N affordance and its popover, present only under overflow="collapse". The trigger is a compact button; the popover escapes the bar's clip via the top layer and lists the dropped items.
Tokens & coverage
What the component consumes, checked live against what the algorithm produces.
Live coverage check against the xoji-default register
(derive(xojiDefault, { anchors }) →
coverComponent(manifest, register)). Every token this component
consumes must be a key the algorithm produces.
--bg-1
--bg-2
--border-normal
--border-thick
--border-thin
--elevation-3
--fg-0
--fg-1
--fg-2
--font-mono
--line
--radius-md
--radius-sm
--ring
--space-1
--space-2
--space-4
--space-6
--space-8
--surface-overlay
--surface-overlay-border
--text-xs
--weight-medium
Slots
The status items and spacers, in order.
Accessibility
Code
Items, spacers, and a live region
A status row split by a spacer, plus a live-updating build bar.
<xoji-statusbar label="Editor status">
<span class="xoji-statusbar__item xoji-statusbar__item--strong" part="item">main.ts</span>
<span class="xoji-statusbar__item" part="item">UTF-8</span>
<span class="xoji-statusbar__item" part="item">Ln 42, Col 8</span>
<span class="xoji-statusbar__spacer" part="spacer"></span>
<span class="xoji-statusbar__item" part="item">Spaces: 2</span>
<span class="xoji-statusbar__item" part="item">TypeScript</span>
</xoji-statusbar>
<xoji-statusbar live label="Build status">
<span class="xoji-statusbar__item xoji-statusbar__item--strong" part="item">Build passing</span>
<span class="xoji-statusbar__spacer" part="spacer"></span>
<span class="xoji-statusbar__item" part="item">12.4s</span>
</xoji-statusbar>
<script lang="ts">
import { Statusbar } from "@xoji/svelte";
</script>
<Statusbar label="Editor status">
<span class="xoji-statusbar__item xoji-statusbar__item--strong">main.ts</span>
<span class="xoji-statusbar__item">UTF-8</span>
<span class="xoji-statusbar__item">Ln 42, Col 8</span>
<span class="xoji-statusbar__spacer"></span>
<span class="xoji-statusbar__item">Spaces: 2</span>
<span class="xoji-statusbar__item">TypeScript</span>
</Statusbar>
<Statusbar live label="Build status">
<span class="xoji-statusbar__item xoji-statusbar__item--strong">Build passing</span>
<span class="xoji-statusbar__spacer"></span>
<span class="xoji-statusbar__item">12.4s</span>
</Statusbar>
---
import { Statusbar } from "@xoji/astro";
---
<Statusbar label="Editor status">
<span class="xoji-statusbar__item xoji-statusbar__item--strong">main.ts</span>
<span class="xoji-statusbar__item">UTF-8</span>
<span class="xoji-statusbar__item">Ln 42, Col 8</span>
<span class="xoji-statusbar__spacer"></span>
<span class="xoji-statusbar__item">Spaces: 2</span>
<span class="xoji-statusbar__item">TypeScript</span>
</Statusbar>
<Statusbar live label="Build status">
<span class="xoji-statusbar__item xoji-statusbar__item--strong">Build passing</span>
<span class="xoji-statusbar__spacer"></span>
<span class="xoji-statusbar__item">12.4s</span>
</Statusbar>