Display

Status Marker Row

A row with a status badge readable without colour: every state gets its own marker shape and its own word, with colour only the third cue.

  • item
  • row
  • status
  • a11y

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/item-009?lang=en

  • api.vibeui.ruПрод · последняя проверка 40 секунд назадРаботает
  • 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 "item-009" (Status Marker Row) 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/item-009.json
    
    Registry item: https://vibeui.ru/r/item-009.json
    Installs to: components/vibeui/item-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
    A row with a status badge readable without colour: every state gets its own marker shape and its own word, with colour only the third cue.
    
    A list row with a status marker: shape, word and colour together. Zero dependencies, one file, no client JS.
    
    ## 3. How to use it
    import { Item009 } from "@/components/vibeui/item-009"
    
    <Item009 title="api.vibeui.ru" state="fail" label="Failed" />
    
    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-item-009-* palette — do not swap it for your theme tokens
    - the distinct marker shapes: colour alone fails for colour blindness and in black and white print
    - the status word as real text — it is needed both by a screen reader and by page search
    - deriving the badge fill, border and text from a single tone through color-mix
    - aria-hidden on the marker: the shape repeats the word beside it
    - the li element: rows belong in a list, not a pile of divs
    
    ## 6. You may change
    - title and meta — the object name and the details line
    - state — one of the four states
    - label — the status word when the built-in one does not fit
    - the state colours and the row width
    
    ## 7. Rules
    - There are exactly four states: a fifth shape readable at eight pixels no longer exists.
    - Do not replace the status word with a coloured dot — the badge stops working in print.
    - Wrap the rows in a <ul>: a lone li outside a list is invalid.
    - 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/item-009.json
    https://vibeui.ru/r/item-009.json

    Компонент самодостаточен: один файл, без зависимостей, собственная палитра в локальных переменных --vibeui-item-009-*. Серверный: хуков нет. Состояние приходит пропом state и попадает в data-state на корне; тон метки выбирается переменной --vibeui-item-009-tone, поэтому фон, рамка и текст пилюли считаются из одного значения. Форму маркера задают border-radius, clip-path и box-shadow: круг, треугольник, ромб и кольцо различимы при дальтонизме и на чёрно-белой печати.

    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 Item009State = "ok" | "wait" | "fail" | "off"
    
    export type Item009Props = Omit<
      ComponentPropsWithoutRef<"li">,
      "children" | "title"
    > & {
      title?: string
      meta?: string
      state?: Item009State
      label?: string
    }
    
    // Идея компонента: строка с меткой состояния, которую можно прочитать без
    // цвета. Каждому состоянию отвечает своя форма маркера — круг, треугольник,
    // квадрат и кольцо, — и своё слово. Цвет здесь третий по счёту признак, а не
    // единственный: при дальтонизме и на чёрно-белой печати зелёное и красное
    // сливаются. Само слово состояния лежит в разметке текстом, поэтому попадает
    // и в скринридер, и в поиск по странице.
    const STYLES = `
    :where([data-vibeui-block="item-009"]){
    --vibeui-item-009-bg:oklch(1 0 0);
    --vibeui-item-009-fg:oklch(0.23 0.014 265);
    --vibeui-item-009-muted:oklch(0.56 0.014 265);
    --vibeui-item-009-border:oklch(0.9 0.006 265);
    --vibeui-item-009-ok:oklch(0.58 0.15 152);
    --vibeui-item-009-wait:oklch(0.68 0.14 78);
    --vibeui-item-009-fail:oklch(0.58 0.19 27);
    --vibeui-item-009-off:oklch(0.6 0.01 265);
    --vibeui-item-009-font:ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
    }
    [data-vibeui-block="item-009"]{
    display:flex;align-items:center;gap:0.75rem;
    width:100%;max-width:23rem;box-sizing:border-box;padding:0.625rem 0.75rem;
    list-style:none;
    background:var(--vibeui-item-009-bg);
    border:1px solid var(--vibeui-item-009-border);border-radius:0.75rem;
    font-family:var(--vibeui-item-009-font);color:var(--vibeui-item-009-fg);
    }
    [data-vibeui-block="item-009"] *{box-sizing:border-box}
    [data-vibeui-block="item-009"] [data-part="text"]{flex:1 1 auto;min-width:0;display:grid;gap:0.125rem}
    [data-vibeui-block="item-009"] [data-part="title"]{font-size:0.875rem;font-weight:650;line-height:1.3}
    [data-vibeui-block="item-009"] [data-part="meta"]{font-size:0.75rem;line-height:1.35;color:var(--vibeui-item-009-muted);font-variant-numeric:tabular-nums}
    [data-vibeui-block="item-009"] [data-part="badge"]{
    flex:none;display:inline-flex;align-items:center;gap:0.375rem;
    padding:0.1875rem 0.5rem 0.1875rem 0.4375rem;border-radius:999px;
    border:1px solid color-mix(in oklab,var(--vibeui-item-009-tone) 40%,transparent);
    background:color-mix(in oklab,var(--vibeui-item-009-tone) 12%,transparent);
    color:color-mix(in oklab,var(--vibeui-item-009-tone) 72%,black);
    font-size:0.6875rem;font-weight:650;line-height:1.4;white-space:nowrap;
    }
    /* Форма маркера различает состояния там, где цвет уже не работает. */
    [data-vibeui-block="item-009"] [data-part="mark"]{
    width:0.5rem;height:0.5rem;background:var(--vibeui-item-009-tone);
    }
    [data-vibeui-block="item-009"][data-state="ok"]{--vibeui-item-009-tone:var(--vibeui-item-009-ok)}
    [data-vibeui-block="item-009"][data-state="wait"]{--vibeui-item-009-tone:var(--vibeui-item-009-wait)}
    [data-vibeui-block="item-009"][data-state="fail"]{--vibeui-item-009-tone:var(--vibeui-item-009-fail)}
    [data-vibeui-block="item-009"][data-state="off"]{--vibeui-item-009-tone:var(--vibeui-item-009-off)}
    [data-vibeui-block="item-009"][data-state="ok"] [data-part="mark"]{border-radius:999px}
    [data-vibeui-block="item-009"][data-state="wait"] [data-part="mark"]{clip-path:polygon(50% 0,100% 100%,0 100%)}
    [data-vibeui-block="item-009"][data-state="fail"] [data-part="mark"]{border-radius:1px;transform:rotate(45deg)}
    [data-vibeui-block="item-009"][data-state="off"] [data-part="mark"]{
    border-radius:999px;background:none;
    box-shadow:inset 0 0 0 2px var(--vibeui-item-009-tone);
    }
    @media (prefers-reduced-motion:reduce){[data-vibeui-block="item-009"] *{animation:none!important;transition:none!important}}
    `
    
    const LABELS: Record<Item009State, string> = {
      ok: "Работает",
      wait: "Разворачивается",
      fail: "Ошибка",
      off: "Отключено",
    }
    
    /**
     * Строка списка с меткой состояния: форма, слово и только затем цвет.
     * Один файл, ноль зависимостей, собственная палитра.
     */
    export function Item009({
      title = "api.vibeui.ru",
      meta = "Прод · последняя проверка 40 секунд назад",
      state = "ok",
      label,
      className,
      style,
      ...props
    }: Item009Props) {
      const text = label ?? LABELS[state]
    
      return (
        <>
          <style href="vibeui-item-009" precedence="medium">
            {STYLES}
          </style>
          <li
            {...props}
            data-vibeui-block="item-009"
            data-state={state}
            className={className}
            style={style as CSSProperties}
          >
            <span data-part="text">
              <span data-part="title">{title}</span>
              {meta ? <span data-part="meta">{meta}</span> : null}
            </span>
            <span data-part="badge">
              <span data-part="mark" aria-hidden="true" />
              {text}
            </span>
          </li>
        </>
      )
    }