Display
Icon Lead Row
A list row with a leading glyph: a fixed-size tile keeps the title column on one vertical line, and its colours are derived from a single tint.
- item
- list
- row
- icon
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/item-002?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 "item-002" (Icon Lead 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-002.json
Registry item: https://vibeui.ru/r/item-002.json
Installs to: components/vibeui/item-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 list row with a leading glyph: a fixed-size tile keeps the title column on one vertical line, and its colours are derived from a single tint.
A list row with a leading glyph tile and a secondary line under the title. Zero dependencies, one file, no client JS.
## 3. How to use it
import { Item002 } from "@/components/vibeui/item-002"
<Item002 title="Contracts" glyph="C" meta="8 files" />
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-002-* palette — do not swap it for your theme tokens
- the fixed tile square: a fluid width shifts the title column on every row
- deriving the tile fill and glyph colour from one tint through color-mix — otherwise the pair drifts apart
- aria-hidden on the tile: the glyph repeats the title and is noise in speech
- the ellipsis on the title: wrapping to a second line changes row height in a dense list
- the li element: rows belong in a list, not a pile of divs
## 6. You may change
- title and meta — the row title and the secondary text
- glyph — one or two letters on the tile
- the tile tint through the tint prop
- the row width and corner radius
## 7. Rules
- The tile fits one or two letters: three no longer fit the square.
- Wrap the rows in a <ul>: a lone li outside a list is invalid.
- For a row that is one big link use item-001 or item-004.
- 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-002.jsonhttps://vibeui.ru/r/item-002.jsonКомпонент самодостаточен: один файл, без зависимостей, собственная палитра в локальных переменных --vibeui-item-002-*. Серверный: хуков и обработчиков нет. Корень — li с флексом; плитка знака имеет фиксированный квадрат 2.25rem и не сжимается, поэтому названия всех строк начинаются по одной вертикали. Фон плитки и цвет знака считаются из --vibeui-item-002-tint через color-mix, поэтому пара не может рассогласоваться. Текстовые узлы обрезаются многоточием и не ломают высоту строки.
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 Item002Props = Omit<
ComponentPropsWithoutRef<"li">,
"children" | "title"
> & {
title?: string
meta?: string
glyph?: string
tint?: string
}
// Идея компонента: строка списка с ведущим знаком. Знак не украшение, а якорь
// для глаза: он всегда одного размера и всегда на одном месте, поэтому колонка
// названий начинается по одной вертикали независимо от длины текста. Оттенок
// плитки считается от одного числа, а фон и цвет знака выводятся из него через
// color-mix — рассогласовать пару невозможно.
const STYLES = `
:where([data-vibeui-block="item-002"]){
--vibeui-item-002-bg:oklch(1 0 0);
--vibeui-item-002-fg:oklch(0.23 0.014 265);
--vibeui-item-002-muted:oklch(0.56 0.014 265);
--vibeui-item-002-border:oklch(0.9 0.006 265);
--vibeui-item-002-tint:oklch(0.55 0.17 265);
--vibeui-item-002-font:ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
}
[data-vibeui-block="item-002"]{
display:flex;align-items:center;gap:0.6875rem;
width:100%;max-width:22rem;box-sizing:border-box;padding:0.625rem 0.75rem;
list-style:none;
background:var(--vibeui-item-002-bg);
border:1px solid var(--vibeui-item-002-border);border-radius:0.75rem;
font-family:var(--vibeui-item-002-font);color:var(--vibeui-item-002-fg);
}
[data-vibeui-block="item-002"] *{box-sizing:border-box}
/* Плитка знака: фиксированный квадрат, поэтому колонка названий не пляшет. */
[data-vibeui-block="item-002"] [data-part="glyph"]{
flex:none;display:grid;place-items:center;
width:2.25rem;height:2.25rem;border-radius:0.625rem;
background:color-mix(in oklab,var(--vibeui-item-002-tint) 14%,transparent);
color:var(--vibeui-item-002-tint);
font-size:0.9375rem;font-weight:700;line-height:1;
}
[data-vibeui-block="item-002"] [data-part="text"]{display:grid;gap:0.125rem;min-width:0}
[data-vibeui-block="item-002"] [data-part="title"]{
font-size:0.875rem;font-weight:650;line-height:1.3;
overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
/* Вторичная строка обрезается вторая: главное имя важнее подробностей. */
[data-vibeui-block="item-002"] [data-part="meta"]{
font-size:0.75rem;line-height:1.35;color:var(--vibeui-item-002-muted);
overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
@media (prefers-reduced-motion:reduce){[data-vibeui-block="item-002"] *{animation:none!important;transition:none!important}}
`
/**
* Строка списка с ведущим знаком и вторичным текстом.
* Один файл, ноль зависимостей, собственная палитра.
*/
export function Item002({
title = "Проектная документация",
meta = "14 файлов · обновлено вчера",
glyph = "ПД",
tint,
className,
style,
...props
}: Item002Props) {
const palette = {
...(tint ? { "--vibeui-item-002-tint": tint } : null),
...style,
} as CSSProperties
return (
<>
<style href="vibeui-item-002" precedence="medium">
{STYLES}
</style>
<li
{...props}
data-vibeui-block="item-002"
className={className}
style={palette}
>
<span data-part="glyph" aria-hidden="true">
{glyph}
</span>
<span data-part="text">
<span data-part="title">{title}</span>
{meta ? <span data-part="meta">{meta}</span> : null}
</span>
</li>
</>
)
}