Feedback

Staging Banner

A staging bar: diagonal hatching, a monospaced label and the environment name — impossible to mistake for production, even in a screenshot.

  • banner
  • staging
  • environment
  • warning

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/banner-004?lang=en

Test mode

Платежи не проходят, письма никому не уходят. Данные обнуляются каждую ночь.

staging
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-004" (Staging 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-004.json

Registry item: https://vibeui.ru/r/banner-004.json
Installs to: components/vibeui/banner-004.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 staging bar: diagonal hatching, a monospaced label and the environment name — impossible to mistake for production, even in a screenshot.

A test-mode bar with hatching and the environment name. Zero dependencies, one file, no client JS.

## 3. How to use it
import { Banner004 } from "@/components/vibeui/banner-004"

<Banner004
  label="Test mode"
  note="Payments do not go through, emails are not sent."
  environment="staging"
/>

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-004-* palette — do not swap it for your theme tokens
- the deliberate mismatch with the product UI: the hatching and monospace are the signal
- the environment name in the accessible label — visible in a screenshot, otherwise never spoken
- the consequences next to the label: "test mode" on its own says nothing
- the @container rule on the inner shell — a container query never applies to the container itself
- the bar's own light surface: without it the dark text disappears on a dark background

## 6. You may change
- the label through label and the explanation through note
- the environment name through environment
- the hatching pitch in the tape rule
- the stripe colour through the --vibeui-banner-004-stripe variable

## 7. Rules
- The bar does not detect the environment: the name comes from build variables.
- At narrow widths the hatching and the environment chip hide — do not put unique facts there.
- The yellow here is deliberately calm: a red bar on every screen stops working within a day.
- 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-004.json
https://vibeui.ru/r/banner-004.json

Компонент самодостаточен: один файл, без зависимостей, собственная палитра в локальных переменных --vibeui-banner-004-*. Серверный: хуков нет. Штриховка нарисована repeating-linear-gradient, а не картинкой, поэтому масштабируется без потерь. Раскладка считается от собственной ширины: container-type:inline-size на корне, @container на внутреннем shell. На узкой ширине штриховка и метка окружения скрываются — остаётся главное. Полоса объявлена role="note" с доступным именем, включающим окружение.

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 Banner004Props = Omit<
  ComponentPropsWithoutRef<"div">,
  "children"
> & {
  label?: string
  note?: string
  /** Окружение: попадает в текст и в подпись для скринридера. */
  environment?: string
}

// Идея компонента: полоса тестового режима. Косая штриховка и моноширинный
// шрифт делают её непохожей на продуктовый интерфейс — именно этого мы и
// добиваемся: она должна кричать «это не боевые данные» с любого скриншота.
const STYLES = `
:where([data-vibeui-block="banner-004"]){
--vibeui-banner-004-bg:oklch(0.97 0.05 95);
--vibeui-banner-004-fg:oklch(0.32 0.07 75);
--vibeui-banner-004-muted:oklch(0.48 0.06 75);
--vibeui-banner-004-stripe:oklch(0.86 0.11 95);
--vibeui-banner-004-border:oklch(0.82 0.11 95);
--vibeui-banner-004-font:ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
--vibeui-banner-004-mono:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
container-type:inline-size;
}
[data-vibeui-block="banner-004"]{
width:100%;box-sizing:border-box;
font-family:var(--vibeui-banner-004-font);color:var(--vibeui-banner-004-fg);
}
[data-vibeui-block="banner-004"] [data-part="shell"]{
display:flex;align-items:center;gap:0.75rem;
box-sizing:border-box;
padding:0.625rem 0.9375rem;
border:1px solid var(--vibeui-banner-004-border);
border-radius:0.75rem;
background:var(--vibeui-banner-004-bg);
}
/* Косая штриховка сверху: полосу невозможно спутать с боевым интерфейсом. */
[data-vibeui-block="banner-004"] [data-part="tape"]{
flex:none;width:2.75rem;height:1.125rem;border-radius:0.25rem;
background:repeating-linear-gradient(
-45deg,
var(--vibeui-banner-004-stripe) 0 0.375rem,
transparent 0.375rem 0.75rem
);
}
[data-vibeui-block="banner-004"] [data-part="label"]{
font-family:var(--vibeui-banner-004-mono);
font-size:0.75rem;font-weight:700;letter-spacing:0.08em;text-transform:uppercase;
white-space:nowrap;
}
[data-vibeui-block="banner-004"] [data-part="note"]{
margin:0;min-width:0;font-size:0.8125rem;line-height:1.45;color:var(--vibeui-banner-004-muted);
}
[data-vibeui-block="banner-004"] [data-part="env"]{
margin-left:auto;flex:none;
padding:0.125rem 0.5rem;border-radius:0.375rem;
border:1px dashed var(--vibeui-banner-004-border);
background:oklch(1 0 0 / 55%);
font-family:var(--vibeui-banner-004-mono);font-size:0.6875rem;font-weight:650;
}
@container (max-width: 30rem){
[data-vibeui-block="banner-004"] [data-part="tape"]{display:none}
[data-vibeui-block="banner-004"] [data-part="env"]{display:none}
}
@media (prefers-reduced-motion:reduce){[data-vibeui-block="banner-004"] *{animation:none!important;transition:none!important}}
`

/**
 * Полоса тестового режима: штриховка, моноширинная метка и имя окружения.
 * Один файл, ноль зависимостей, собственная палитра.
 */
export function Banner004({
  label = "Тестовый режим",
  note = "Платежи не проходят, письма никому не уходят. Данные обнуляются каждую ночь.",
  environment = "staging",
  className,
  style,
  ...props
}: Banner004Props) {
  return (
    <>
      <style href="vibeui-banner-004" precedence="medium">
        {STYLES}
      </style>
      <div
        {...props}
        data-vibeui-block="banner-004"
        role="note"
        aria-label={`${label}: ${environment}`}
        className={className}
        style={style as CSSProperties}
      >
        <div data-part="shell">
          <span data-part="tape" aria-hidden="true" />
          <span data-part="label">{label}</span>
          <p data-part="note">{note}</p>
          {environment ? <span data-part="env">{environment}</span> : null}
        </div>
      </div>
    </>
  )
}