On this page
@addTagHelper *, Webority.Ui.RazorOffline
A strip under the top bar while the browser is offline. The content below stays readable; the banner says when it last loaded. Toggle the browser's offline mode to see it, and the back-online message.
Offline with a time and Check again
Offline, no time
Follow the browser
Guidance
What to do, and what to avoid.
Use it when
- The connection drops while a person works on a page that shows content already loaded.
- The page should say how old the content on screen is.
Reach for something else when
- A message after a save or an action that disappears on its own. → toast
- One part of the page failed to load and the rest still works. → AppResultBlock
Say when the content last loaded
Do
The time tells a person how old the figures are, so they know whether to trust them.
Avoid
Without a time a person cannot tell how old the figures on screen are.
Reference
Try every prop, read the full list, and check keyboard and screen reader behaviour.
3 props. The 2 most used come first.
Used on most screens 2 props
| Prop | Type | Default | Description |
|---|---|---|---|
| offlinedefault follows the browser | bool | follows the browser | Shows the banner while true, hides it while false. Unset, the banner follows the browser's connection and shows the back-online line for a few seconds. |
| loaded-atdefault none | string | none | When the content on the page last loaded, as the screen formats it (for example 23:12). |
Less common 1 props
| Prop | Type | Default | Description |
|---|---|---|---|
| check-againdefault false | bool | false | Draws the Check again button. A press is reported as a wui:offline-banner:check-again event on the element. |
Screen reader
2 notes- The banner is a status region, so a screen reader announces going offline and coming back online.
- Check again is a native button with its own name and focus ring.
Do and avoid
1 pairsSay when the content last loaded
Do
The time tells a person how old the figures are, so they know whether to trust them.
Avoid
Without a time a person cannot tell how old the figures on screen are.