<script> tag into your site to show live status from your
Kōdo status page. The widget respects your page’s brand color, auto-refreshes,
and surfaces active incidents inline.
Quick start
your-page-slug with the slug of a public status page. The script
inserts the widget directly after itself (except floating, which attaches
to <body>).
Styles
badge — pill indicator
A compact pill with a pulsing dot and status label. Inherits the page’s
primary_color when operational; falls back to semantic colors (amber /
orange / red) during incidents.
banner — full-width strip
Horizontal banner meant for the top of a page or layout.
floating — fixed corner pill
Pinned to a corner of the viewport. Use data-position to choose:
bottom-right (default), bottom-left, top-right, top-left.
incident — live incident banner
Shows only when there is an active incident. Displays severity, phase,
time since last update, and the incident title. Great for app-top alert
bars that disappear when things are healthy.
data-hide-when-operational="true" (recommended), the widget renders
nothing while all systems are operational. If the attribute is omitted or
false, the widget falls back to a banner style when there is no active
incident.
Attributes
| Attribute | Values | Default | Description |
|---|---|---|---|
data-page | string | required | Public status page slug. |
data-style | badge / banner / floating / incident | badge | Widget variant. |
data-position | bottom-right / bottom-left / top-right / top-left | bottom-right | Floating-only placement. |
data-theme | auto / light / dark | auto | Theme preference for subtle shadow / contrast. |
data-hide-when-operational | true / false | false | incident style only — hide entirely when no active incidents. |
Programmatic API
The widget dispatches akodo:status-change custom event on window
whenever overall status changes between polls:
Branding
The widget automatically reads the following from your status page:primary_color— used as the operational backgroundtheme_mode— currently influences shadow weight; expanded theming is planned
Refresh behaviour
The widget connects to a server-sent events stream and receives new snapshots as soon as the server detects a change (within ~5 seconds of the event). If the browser does not supportEventSource, or the stream
fails before the first snapshot arrives, the widget transparently falls
back to polling every 60 seconds.
Each SSE connection is capped at ~55 seconds and then gracefully rotated
— the client reconnects automatically with no visible flicker.
Server-sent events endpoint
If you want to build your own live widget, subscribe to:snapshot— the fullStatusSnapshotJSON, sent on connect and again whenever the snapshot changesreconnect— sent just before the server closes the stream so the client can reconnect for another windowerror— sent with{ "message": "not_found" }if the slug is invalid
Accessibility
The widget root is rendered withrole="status" and aria-live="polite",
so screen readers announce status changes without stealing focus. All
user-supplied strings (incident titles, etc.) are HTML-escaped.