Feedback

Offline State

An offline state that does not look like a broken app: the retries are visibly ongoing, and the age of the data on screen is spelled out.

  • empty
  • offline
  • network
  • retry

Preview

1440pxHost theme

Use it with AI

  1. 1. Copy the link.
  2. 2. Write to your agent in your own words and drop the link into the sentence.
  3. 3. The agent opens the link and installs the component from the registry.

put this in the header: https://vibeui.ru/c/empty-009?lang=en

No connection

Пробуем переподключиться

Список откроется сам, как только связь вернётся. Ничего из введённого не потеряно.

Screen data from 14:08

Show the full instructions

What the link says, spelled out. Use it when your agent cannot open links — paste this text instead.

# Install and place "empty-009" (Offline State) from VibeUI

## 1. Install first — do not skip, do not recreate
Run this exact command before writing any code:
npx shadcn@latest add https://vibeui.ru/r/empty-009.json

Registry item: https://vibeui.ru/r/empty-009.json
Installs to: components/vibeui/empty-009.tsx (the exact path follows this project's components.json aliases).
npm dependencies: none.
Registry dependencies: none.

Install it from the registry. Do not recreate it from the description,
do not substitute a similar component from another library, and do not
rewrite it to match the project's existing style.

## 2. What it is
An offline state that does not look like a broken app: the retries are visibly ongoing, and the age of the data on screen is spelled out.

An offline state: a broken-connection mark, a heading, a pulsing "reconnecting" label, an explanation, a manual retry button and the time of the last update. Zero dependencies, one file, its own palette.

## 3. How to use it
import { Empty009 } from "@/components/vibeui/empty-009"

<Empty009 title="No connection" updatedAt="Screen data from 14:08" onRetry={reconnect} />

Read the installed file for the full prop list.

## 4. Where to place it
This is a small inline component. Put it exactly where the user asked,
inside the existing markup. Do not create a new page, section or
wrapper for it. If a similar control already sits in that spot,
replace it instead of adding a second one.

Placement: ___
(The user fills this line in. If it is still blank, ask where to put it
instead of guessing.)

## 5. Keep exactly as installed
- the local --vibeui-empty-009-* palette — do not swap it for your theme tokens
- visible waiting: the pulsing dot promises that retries are happening on their own
- the last update time — it says how stale what is on screen has become
- the promise that nothing typed is lost: without it people start over
- the manual retry button for those who will not wait for the next attempt
- the prefers-reduced-motion rule that stops the pulse
- role="status" with aria-live: a change in connection has to be heard

## 6. You may change
- title and text — the heading and the explanation
- updatedAt — the line about how old the data on screen is
- retryLabel — the manual retry wording
- the onRetry handler — it is what attempts the connection
- the pulse speed and the waiting colour through the palette

## 7. Rules
- The component does not detect the network: watch navigator.onLine or your request results yourself.
- Do not use offline in place of a server error: different causes, different actions.
- The retry button has to do something with no network: show a refusal rather than silence.
- Do not lift the CSS variables into globals.css: the component has to stay a single file.

## 8. Verify
- it renders with no console errors;
- it looks like the preview on the VibeUI page you copied this from;
- if it does not, you changed something listed in section 5 — put it back.

For developers

npx shadcn@latest add https://vibeui.ru/r/empty-009.json
https://vibeui.ru/r/empty-009.json

Компонент самодостаточен: один файл, без зависимостей, собственная палитра в локальных переменных --vibeui-empty-009-*. Серверный: хуков нет. Облако с перечёркиванием нарисовано псевдоэлементами, точка ожидания пульсирует ключевыми кадрами vibeui-empty-009-pulse, и правило prefers-reduced-motion её останавливает. Блок объявлен role="status" с aria-live="polite", подложка своя и светлая.

Component source

The same file your agent installs. Here in case you would rather copy it by hand.

import type { ComponentPropsWithoutRef, CSSProperties } from "react"

export type Empty009Props = Omit<
  ComponentPropsWithoutRef<"div">,
  "children" | "title"
> & {
  title?: string
  text?: string
  updatedAt?: string
  retryLabel?: string
  onRetry?: () => void
}

// Идея компонента: офлайн-состояние, которое не выглядит поломкой приложения.
// Пульсирующая точка показывает, что попытки продолжаются сами, строка с
// временем последнего обновления говорит, насколько устарели данные на
// экране, а кнопка нужна тем, кто не хочет ждать очередной попытки.
const STYLES = `
:where([data-vibeui-block="empty-009"]){
--vibeui-empty-009-bg:oklch(0.99 0.002 265);
--vibeui-empty-009-fg:oklch(0.21 0.014 265);
--vibeui-empty-009-muted:oklch(0.55 0.014 265);
--vibeui-empty-009-border:oklch(0.91 0.006 265);
--vibeui-empty-009-wait:oklch(0.62 0.15 65);
--vibeui-empty-009-font:ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
}
[data-vibeui-block="empty-009"]{
display:flex;flex-direction:column;align-items:center;gap:0.5rem;
width:100%;max-width:24rem;box-sizing:border-box;padding:1.5rem 1.25rem;
text-align:center;
background:var(--vibeui-empty-009-bg);
border:1px solid var(--vibeui-empty-009-border);border-radius:1rem;
font-family:var(--vibeui-empty-009-font);color:var(--vibeui-empty-009-fg);
}
/* Облако с перечёркиванием: связь не «сломана», а отсутствует. */
[data-vibeui-block="empty-009"] [data-part="mark"]{
position:relative;width:3rem;height:2.25rem;color:var(--vibeui-empty-009-muted);
}
[data-vibeui-block="empty-009"] [data-part="mark"]::before{
content:"";position:absolute;left:0.25rem;bottom:0.5rem;width:2.5rem;height:1.125rem;
border:2px solid currentColor;border-radius:9999px 9999px 0.5rem 0.5rem;opacity:.6;
}
[data-vibeui-block="empty-009"] [data-part="mark"]::after{
content:"";position:absolute;left:0.125rem;top:0.1875rem;width:2.75rem;height:2px;
background:var(--vibeui-empty-009-wait);transform:rotate(38deg);transform-origin:left center;
border-radius:9999px;
}
[data-vibeui-block="empty-009"] [data-part="title"]{margin:0.125rem 0 0;font-size:1rem;font-weight:680;line-height:1.3}
[data-vibeui-block="empty-009"] [data-part="text"]{
margin:0;max-width:32ch;font-size:0.8125rem;line-height:1.5;color:var(--vibeui-empty-009-muted);
}
/* Точка пульсирует, пока идут повторы: ожидание должно быть видно. */
[data-vibeui-block="empty-009"] [data-part="status"]{
display:inline-flex;align-items:center;gap:0.4375rem;margin:0.25rem 0 0;
padding:0.3125rem 0.6875rem;border-radius:9999px;
background:color-mix(in oklab,var(--vibeui-empty-009-wait) 14%,transparent);
font-size:0.75rem;font-weight:650;
}
[data-vibeui-block="empty-009"] [data-part="pulse"]{
width:0.4375rem;height:0.4375rem;border-radius:9999px;background:var(--vibeui-empty-009-wait);
animation:vibeui-empty-009-pulse 1.6s ease-in-out infinite;
}
@keyframes vibeui-empty-009-pulse{
0%,100%{opacity:1;transform:scale(1)}
50%{opacity:.35;transform:scale(0.72)}
}
[data-vibeui-block="empty-009"] [data-part="action"]{
appearance:none;cursor:pointer;margin-top:0.5rem;
height:2.5rem;padding:0 1.125rem;border-radius:0.75rem;
border:1px solid var(--vibeui-empty-009-border);
background:oklch(1 0 0);color:var(--vibeui-empty-009-fg);
font:inherit;font-size:0.875rem;font-weight:650;
}
[data-vibeui-block="empty-009"] [data-part="action"]:hover{background:oklch(0.97 0.003 265)}
[data-vibeui-block="empty-009"] [data-part="action"]:focus-visible{outline:2px solid var(--vibeui-empty-009-wait);outline-offset:2px}
[data-vibeui-block="empty-009"] [data-part="stamp"]{
margin:0.375rem 0 0;font-size:0.6875rem;color:var(--vibeui-empty-009-muted);
}
@media (prefers-reduced-motion:reduce){[data-vibeui-block="empty-009"] *{animation:none!important;transition:none!important}}
`

/**
 * Офлайн-состояние: видимое ожидание, возраст данных и повтор вручную.
 * Один файл, ноль зависимостей, собственная палитра.
 */
export function Empty009({
  title = "Нет соединения",
  text = "Список откроется сам, как только связь вернётся. Ничего из введённого не потеряно.",
  updatedAt = "Данные на экране от 14:08",
  retryLabel = "Попробовать сейчас",
  onRetry,
  className,
  style,
  ...props
}: Empty009Props) {
  return (
    <>
      <style href="vibeui-empty-009" precedence="medium">
        {STYLES}
      </style>
      <div
        {...props}
        data-vibeui-block="empty-009"
        role="status"
        aria-live="polite"
        className={className}
        style={style as CSSProperties}
      >
        <span data-part="mark" aria-hidden="true" />
        <h3 data-part="title">{title}</h3>
        <p data-part="status">
          <span data-part="pulse" aria-hidden="true" />
          Пробуем переподключиться
        </p>
        <p data-part="text">{text}</p>
        <button type="button" data-part="action" onClick={onRetry}>
          {retryLabel}
        </button>
        <p data-part="stamp">{updatedAt}</p>
      </div>
    </>
  )
}