Feedback
Update Banner
A «new version is out» bar with one honest action — reload the page; the version number sits beside it so the message does not read as an ad.
- banner
- update
- version
- reload
Preview
Use it with AI
- 1. Copy the link.
- 2. Write to your agent in your own words and drop the link into the sentence.
- 3. The agent opens the link and installs the component from the registry.
put this in the header: https://vibeui.ru/c/banner-002?lang=en
Вышла новая версия приложения. Перезагрузите страницу, чтобы получить исправления. v2.8.0
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 "banner-002" (Update Banner) 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/banner-002.json
Registry item: https://vibeui.ru/r/banner-002.json
Installs to: components/vibeui/banner-002.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
A «new version is out» bar with one honest action — reload the page; the version number sits beside it so the message does not read as an ad.
An update bar: a message, a version number and a reload button. Zero dependencies, one file, no client JS.
## 3. How to use it
import { Banner002 } from "@/components/vibeui/banner-002"
<Banner002
message="A new version of the app is out."
version="2.8.0"
actionLabel="Reload"
/>
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-banner-002-* palette — do not swap it for your theme tokens
- the slow pulse: a fast blinking dot reads as an outage, while an update can wait
- the @container rule on the inner shell — a container query never applies to the container itself
- role="status" with aria-live="polite": an update must not interrupt current reading
- the version number next to the copy — without it the bar looks like marketing
- the bar's own light surface: without it the dark text disappears on a dark background
## 6. You may change
- the copy through message and the number through version
- the button caption through actionLabel
- the bar width through max-width on the root
- the accent through the --vibeui-banner-002-accent variable
## 7. Rules
- The component does not reload the page: onReload is called by the caller.
- The bar does not decide when to appear — the app compares the versions.
- At narrow widths the button spans the row: check the caption, a long one wraps.
- 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/banner-002.jsonhttps://vibeui.ru/r/banner-002.jsonКомпонент самодостаточен: один файл, без зависимостей, собственная палитра в локальных переменных --vibeui-banner-002-*. Серверный: хуков нет. Раскладка считается от собственной ширины через container-type:inline-size на корне и правило @container на внутреннем shell — контейнерный запрос не действует на сам контейнер. Пульсирующая точка сделана расширяющимся кольцом в ::after с медленным циклом: обновление можно отложить, тревожить не нужно. Полоса объявлена 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 Banner002Props = Omit<
ComponentPropsWithoutRef<"div">,
"children"
> & {
message?: string
/** Номер новой версии: без него «обновитесь» звучит как реклама. */
version?: string
actionLabel?: string
onReload?: () => void
}
// Идея компонента: полоса «вышла новая версия» с одним честным действием —
// перезагрузить страницу. Точка слева мигает медленно и не требует внимания:
// обновление можно отложить, ничего не сломается.
const STYLES = `
:where([data-vibeui-block="banner-002"]){
--vibeui-banner-002-bg:oklch(0.97 0.02 220);
--vibeui-banner-002-fg:oklch(0.27 0.05 240);
--vibeui-banner-002-muted:oklch(0.48 0.05 240);
--vibeui-banner-002-border:oklch(0.86 0.05 230);
--vibeui-banner-002-accent:oklch(0.52 0.16 245);
--vibeui-banner-002-font:ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
--vibeui-banner-002-mono:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
container-type:inline-size;
}
[data-vibeui-block="banner-002"]{
width:100%;box-sizing:border-box;
font-family:var(--vibeui-banner-002-font);color:var(--vibeui-banner-002-fg);
}
[data-vibeui-block="banner-002"] [data-part="shell"]{
display:flex;align-items:center;gap:0.75rem;flex-wrap:wrap;
box-sizing:border-box;padding:0.6875rem 1rem;
border:1px solid var(--vibeui-banner-002-border);border-radius:0.875rem;
background:var(--vibeui-banner-002-bg);
}
[data-vibeui-block="banner-002"] [data-part="pulse"]{
position:relative;flex:none;width:0.5rem;height:0.5rem;border-radius:9999px;
background:var(--vibeui-banner-002-accent);
}
/* Медленный пульс: обновление можно отложить, тревожить не нужно. */
[data-vibeui-block="banner-002"] [data-part="pulse"]::after{
content:"";position:absolute;inset:-0.25rem;border-radius:9999px;
border:1px solid var(--vibeui-banner-002-accent);
animation:vibeui-banner-002-pulse 2.4s ease-out infinite;
}
@keyframes vibeui-banner-002-pulse{
0%{opacity:.7;transform:scale(.6)}
100%{opacity:0;transform:scale(1.5)}
}
[data-vibeui-block="banner-002"] [data-part="text"]{
flex:1 1 14rem;min-width:0;margin:0;font-size:0.8125rem;line-height:1.45;
}
[data-vibeui-block="banner-002"] [data-part="version"]{
font-family:var(--vibeui-banner-002-mono);font-size:0.75rem;font-weight:600;
padding:0.0625rem 0.375rem;border-radius:0.375rem;
background:oklch(1 0 0 / 65%);color:var(--vibeui-banner-002-muted);
}
[data-vibeui-block="banner-002"] [data-part="action"]{
appearance:none;cursor:pointer;border:0;flex:none;
height:1.9375rem;padding:0 0.8125rem;border-radius:0.5rem;
background:var(--vibeui-banner-002-accent);color:oklch(0.99 0.01 245);
font:inherit;font-size:0.8125rem;font-weight:650;
transition:filter .16s ease;
}
[data-vibeui-block="banner-002"] [data-part="action"]:hover{filter:brightness(1.08)}
[data-vibeui-block="banner-002"] [data-part="action"]:focus-visible{outline:2px solid var(--vibeui-banner-002-accent);outline-offset:2px}
@container (max-width: 30rem){
[data-vibeui-block="banner-002"] [data-part="shell"]{align-items:flex-start}
[data-vibeui-block="banner-002"] [data-part="action"]{width:100%}
}
@media (prefers-reduced-motion:reduce){[data-vibeui-block="banner-002"] *{animation:none!important;transition:none!important}}
`
/**
* Полоса обновления: сообщение о новой версии и кнопка перезагрузки.
* Один файл, ноль зависимостей, собственная палитра.
*/
export function Banner002({
message = "Вышла новая версия приложения. Перезагрузите страницу, чтобы получить исправления.",
version = "2.8.0",
actionLabel = "Перезагрузить",
onReload,
className,
style,
...props
}: Banner002Props) {
return (
<>
<style href="vibeui-banner-002" precedence="medium">
{STYLES}
</style>
<div
{...props}
data-vibeui-block="banner-002"
role="status"
aria-live="polite"
className={className}
style={style as CSSProperties}
>
<div data-part="shell">
<span data-part="pulse" aria-hidden="true" />
<p data-part="text">
{message}{" "}
{version ? <span data-part="version">v{version}</span> : null}
</p>
<button data-part="action" type="button" onClick={onReload}>
{actionLabel}
</button>
</div>
</div>
</>
)
}