Alert
Feature Alert
An announcement about a new capability rather than a problem: a small tile scene instead of a status glyph, and a calm tone.
- alert
- feature
- announcement
- product
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/alert-006?lang=en
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 "alert-006" (Feature Alert) 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/alert-006.json
Registry item: https://vibeui.ru/r/alert-006.json
Installs to: components/vibeui/alert-006.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 announcement about a new capability rather than a problem: a small tile scene instead of a status glyph, and a calm tone.
A feature announcement: a tile scene on the left, a "New" pill, a heading, an explanation, a button and a quiet dismiss link. The tone is calm — product news dressed in error colours reads as an outage. Zero dependencies, one file, its own palette.
## 3. How to use it
import { Alert006 } from "@/components/vibeui/alert-006"
<Alert006
badge="New"
title="Code panel right in the catalog"
actionLabel="Take a look"
actionHref="/components"
/>
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-alert-006-* palette — do not swap it for your theme tokens (bg-accent, text-primary and the like)
- the calm tone: this is news, not a problem, and red breaks the meaning
- the tile scene instead of a status glyph — it is what separates a product message from a system one
- aria-hidden on the scene: it is decorative
- the @container queries: the actions wrap first and the scene hides second — the heading must never be squeezed
- the <style> block inside the component — it holds the palette, the scene and the layout
## 6. You may change
- the badge, title and description copy
- actionLabel and actionHref — where the button leads
- onDismiss and dismissLabel — the quiet dismissal
- the accent through the accent prop — it colours the pill, the button and the glow
- the scene content: the three tiles can be replaced by your own <svg> at the same size
## 7. Rules
- Do not keep this alert around for more than a visit or two: news seen three times becomes noise.
- Do not put it above the form or list someone came to work with — its place is lower, in the calm part of the screen.
- The component does not remember dismissal: the "already seen" flag belongs to the caller.
- 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/alert-006.jsonhttps://vibeui.ru/r/alert-006.jsonКомпонент самодостаточен: один файл, без зависимостей, собственная палитра в локальных переменных --vibeui-alert-006-*. Слева не значок статуса, а маленькая сцена из трёх плиток — намёк на интерфейс, о котором идёт речь; она собрана позиционированными span'ами и не требует картинки. Подсветка угла — радиальный градиент в фоне. На узкой ширине действия переносятся под текст, на очень узкой сцена скрывается через @container.
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 Alert006Props = Omit<
ComponentPropsWithoutRef<"div">,
"title" | "children"
> & {
badge?: string
title?: string
description?: string
actionLabel?: string
actionHref?: string
dismissLabel?: string
onDismiss?: () => void
accent?: string
}
// Идея компонента: рассказ о новой возможности, а не сообщение о проблеме.
// Поэтому слева не значок статуса, а маленькая сцена из плиток — намёк на
// интерфейс, о котором речь. Тон спокойный: продуктовая новость, поставленная
// в цвета ошибки, читается как авария.
const STYLES = `
:where([data-vibeui-block="alert-006"]){
--vibeui-alert-006-fg:oklch(0.22 0.014 265);
--vibeui-alert-006-muted:oklch(0.5 0.014 265);
--vibeui-alert-006-bg:oklch(1 0 0);
--vibeui-alert-006-border:oklch(0.9 0.006 265);
--vibeui-alert-006-accent:oklch(0.55 0.2 262);
--vibeui-alert-006-radius:1rem;
--vibeui-alert-006-font:ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
container-type:inline-size;
}
[data-vibeui-block="alert-006"]{
/* flex-wrap живёт здесь, а не в @container: контейнерный запрос применяется
к потомкам контейнера, но не к нему самому. На широкой раскладке перенос
ни на что не влияет — всё умещается в строку. */
display:flex;flex-wrap:wrap;align-items:center;gap:1rem;
width:100%;box-sizing:border-box;overflow:hidden;
padding:1rem;
border:1px solid var(--vibeui-alert-006-border);
border-radius:var(--vibeui-alert-006-radius);
background:
radial-gradient(120% 140% at 0% 0%,color-mix(in oklab,var(--vibeui-alert-006-accent) 9%,transparent),transparent 60%),
var(--vibeui-alert-006-bg);
color:var(--vibeui-alert-006-fg);font-family:var(--vibeui-alert-006-font);
}
/* Сцена из плиток: намёк на интерфейс вместо значка статуса. */
[data-vibeui-block="alert-006"] [data-part="art"]{
position:relative;flex:none;width:4.5rem;height:3.25rem;
border-radius:0.625rem;overflow:hidden;
border:1px solid var(--vibeui-alert-006-border);
background:oklch(0.98 0.003 265);
}
[data-vibeui-block="alert-006"] [data-part="art"] span{position:absolute;border-radius:0.1875rem;background:color-mix(in oklab,var(--vibeui-alert-006-accent) 22%,transparent)}
[data-vibeui-block="alert-006"] [data-part="art"] span:nth-child(1){left:0.4375rem;top:0.4375rem;width:1.25rem;height:0.375rem}
[data-vibeui-block="alert-006"] [data-part="art"] span:nth-child(2){left:0.4375rem;top:1.125rem;right:0.4375rem;height:0.375rem;opacity:.55}
[data-vibeui-block="alert-006"] [data-part="art"] span:nth-child(3){left:0.4375rem;bottom:0.4375rem;width:1.75rem;height:0.75rem;background:var(--vibeui-alert-006-accent)}
[data-vibeui-block="alert-006"] [data-part="text"]{display:flex;flex-direction:column;gap:0.25rem;flex:1 1 auto;min-width:0}
[data-vibeui-block="alert-006"] [data-part="badge"]{
align-self:flex-start;padding:0.125rem 0.4375rem;border-radius:0.3125rem;
background:color-mix(in oklab,var(--vibeui-alert-006-accent) 14%,transparent);
color:var(--vibeui-alert-006-accent);
font-size:0.6875rem;font-weight:650;letter-spacing:0.02em;
}
[data-vibeui-block="alert-006"] [data-part="title"]{font-size:0.9375rem;font-weight:600;line-height:1.35}
[data-vibeui-block="alert-006"] [data-part="description"]{font-size:0.8125rem;line-height:1.55;color:var(--vibeui-alert-006-muted);max-width:56ch}
[data-vibeui-block="alert-006"] [data-part="actions"]{display:flex;align-items:center;gap:0.75rem;flex:none}
[data-vibeui-block="alert-006"] [data-part="action"]{
display:inline-flex;align-items:center;height:2rem;padding:0 0.875rem;
border-radius:0.5rem;text-decoration:none;
background:var(--vibeui-alert-006-accent);color:oklch(1 0 0);
font-size:0.8125rem;font-weight:600;
transition:filter .16s ease;
}
[data-vibeui-block="alert-006"] [data-part="action"]:hover{filter:brightness(0.94)}
[data-vibeui-block="alert-006"] [data-part="dismiss"]{
appearance:none;border:0;background:none;cursor:pointer;
color:var(--vibeui-alert-006-muted);font:inherit;font-size:0.8125rem;
}
[data-vibeui-block="alert-006"] [data-part="dismiss"]:hover{color:var(--vibeui-alert-006-fg)}
[data-vibeui-block="alert-006"] a:focus-visible,
[data-vibeui-block="alert-006"] button:focus-visible{outline:2px solid var(--vibeui-alert-006-accent);outline-offset:2px}
@container (max-width: 32rem){
/* Текст занимает остаток первой строки, действия уходят на вторую целиком. */
[data-vibeui-block="alert-006"] [data-part="text"]{flex:1 1 60%}
[data-vibeui-block="alert-006"] [data-part="actions"]{width:100%;padding-left:5.5rem}
}
@container (max-width: 22rem){
[data-vibeui-block="alert-006"] [data-part="art"]{display:none}
[data-vibeui-block="alert-006"] [data-part="actions"]{padding-left:0}
}
@media (prefers-reduced-motion:reduce){[data-vibeui-block="alert-006"] *{animation:none!important;transition:none!important}}
`
/**
* Алерт о новой возможности: сцена из плиток вместо значка статуса.
* Один файл, ноль зависимостей, собственная палитра.
*/
export function Alert006({
badge = "Новое",
title = "Панель кода прямо в каталоге",
description = "Команда установки и исходник открываются на карточке — переходить на страницу компонента больше не нужно.",
actionLabel = "Посмотреть",
actionHref = "#",
dismissLabel = "Скрыть",
onDismiss,
accent,
className,
style,
...props
}: Alert006Props) {
const palette = {
...(accent ? { "--vibeui-alert-006-accent": accent } : null),
...style,
} as CSSProperties
return (
<>
<style href="vibeui-alert-006" precedence="medium">
{STYLES}
</style>
<div
{...props}
data-vibeui-block="alert-006"
role="region"
aria-label={title}
className={className}
style={palette}
>
<span data-part="art" aria-hidden="true">
<span />
<span />
<span />
</span>
<span data-part="text">
{badge ? <span data-part="badge">{badge}</span> : null}
<span data-part="title">{title}</span>
{description ? (
<span data-part="description">{description}</span>
) : null}
</span>
<span data-part="actions">
{actionLabel ? (
<a data-part="action" href={actionHref}>
{actionLabel}
</a>
) : null}
{onDismiss && dismissLabel ? (
<button data-part="dismiss" type="button" onClick={onDismiss}>
{dismissLabel}
</button>
) : null}
</span>
</div>
</>
)
}