Skip to content
Twentyfirst UIPro

Connection Card

Data · Button, ConnectionBanner, ConnectionCard

View as Markdown

Connected services and the live connection: ConnectionCard and ConnectionBanner.

ConnectionCard: name, icon or logo (node, e.g. the service's mark), text, status ("connected" | "expiring" | "error" | "missing"), statusLabel, action. ConnectionBanner: state ("reconnecting" | "offline" | "online" hides it), seconds, text, onRetry. Thin bar under the top bar.

Connection lost. Retrying in 4 s
Stripe · FollowerX GmbHPayments and refunds · 3 agentsConnected
Google AdsBudgets and campaigns · 1 agentExpires in 5 days
Docs workspaceRelease notes · EchoError
Offline. Changes are kept and sent when you’re back.

Props

Button

PropTypeNotes
variant?"primary" | "secondary" | "soft" | "ghost" | "danger" | "danger-solid"
size?"md" | "sm"
icon?IconName
iconRight?IconName
disabled?boolean
type?"button" | "submit" | "reset"
onClick?(e: MouseEvent<HTMLButtonElement>) => void
children?ReactNode
asChild?booleanRender the single child element (a link, a router Link) with the button's look instead of a <button>.
id?string
name?stringForm field name and value, sent with the form when this button submits it.
value?string
form?stringThe id of the form this button belongs to, when it sits outside it.
title?string
tabIndex?number
autoFocus?boolean
aria-label?string
aria-labelledby?string
aria-describedby?string
aria-expanded?boolean | "true" | "false"For disclosure and menu triggers: whether what the button controls is open.
aria-controls?string
aria-haspopup?boolean | "true" | "false" | "menu" | "listbox" | "tree" | "grid" | "dialog"
aria-pressed?boolean | "true" | "false" | "mixed"For toggle buttons.
aria-current?boolean | "true" | "false" | "page" | "step" | "location" | "date" | "time"
className?stringExtra class on the root element.
style?CSSPropertiesInline style on the root element.

ConnectionBanner

PropTypeNotes
state"reconnecting" | "offline" | "online"Required
seconds?number
text?ReactNode
onRetry?() => void
className?stringExtra class on the root element.
style?CSSPropertiesInline style on the root element.

ConnectionCard

PropTypeNotes
namestringRequired
icon?IconName
logo?ReactNode
text?ReactNode
status"connected" | "expiring" | "error" | "missing"Required
statusLabel?string
action?ReactNode
className?stringExtra class on the root element.
style?CSSPropertiesInline style on the root element.