Skip to content
caliper ui pro docs

Connection banner

Says when the app lost its connection and what that means, counts down to the next try, and confirms when it is back.

Pro
  • INV-2041 · Ostra Freight€4,800
  • INV-2040 · Northwind€1,250

When to use

  • Apps that keep working offline or queue changes.
  • Realtime tools where a dropped connection loses updates.

When not to use

  • Static sites; the browser already says so.

Installation

terminal
pnpm dlx shadcn@latest add @caliper/connection-banner

Adds its 3 files to components/ui/, each with its own stylesheet, and installs their packages. Pro installs with your access token, set up once per project. See Pro access. The first part also adds Caliper UI’s tokens; import them once as in Installation.

API reference

ConnectionBanner

4 props
PropTypeDefaultDescription
onlineboolean—Leave out to follow the browser's own online state.
onRetry(() => Promise<boolean>)—Checks the connection; resolve true when it is back.
offlineTextstring"You are offline. Changes are kept on this device and sync when you are back."
classNamestring—

Keyboard

  • No custom key handling; Tab and the native activation keys do the work.

Accessibility

It exposes status semantics, with aria-hidden kept in step with state. Changes that matter are announced through a live region.

Notes for AI

Give your coding assistant this page as Markdown instead of screenshots: the props, keyboard and examples in one file.

/docs/components/connection-banner.md

The index of every part is at /llms.txt.

More in Changing values