Feedback
Query Breakdown
An empty search that takes the query apart: the words become chips, the excess ones are struck through, and one action repeats the search with a shorter query.
- empty
- search
- query
- recovery
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/empty-003?lang=en
Ничего не нашлось по запросу
productcardwithpriceandrating
Слишком точный запрос
Чем короче запрос, тем больше он находит. Уточнения лучше добавлять фильтрами, а не словами.
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 "empty-003" (Query Breakdown) 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/empty-003.json
Registry item: https://vibeui.ru/r/empty-003.json
Installs to: components/vibeui/empty-003.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 empty search that takes the query apart: the words become chips, the excess ones are struck through, and one action repeats the search with a shorter query.
A no-results state with a query breakdown: the words are laid out as chips, the extra ones struck through, with an explanation below and exactly one action — search the shortened query. Zero dependencies, one file, its own palette.
## 3. How to use it
import { Empty003 } from "@/components/vibeui/empty-003"
<Empty003 query="product card with price and rating" keep={2} onAction={searchShort} />
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-empty-003-* palette — do not swap it for your theme tokens
- taking the query apart: it shows the cause of the emptiness instead of describing it
- striking out the extra words instead of advising "try something else" — it is visible what to drop
- exactly one primary action: a second option turns search recovery into a decision
- putting the shortened query into the button label — people see what will actually run
- role="status": losing the results has to be heard, not only shown
## 6. You may change
- query — the query itself; the words are split automatically
- keep — how many leading words count as the core of the query
- title and text — the heading and the explanation
- the onAction handler — it is what runs the shortened search
- the card width and its radii through the palette
## 7. Rules
- The shortened query must find something: offering a knowingly empty search is worse than offering none.
- An empty section without a query needs a different screen: that is a first step, not search recovery.
- Splitting on spaces knows nothing of quotes or operators: complex syntax needs its own parser.
- 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/empty-003.jsonhttps://vibeui.ru/r/empty-003.jsonКомпонент самодостаточен: один файл, без зависимостей, собственная палитра в локальных переменных --vibeui-empty-003-*. Серверный: хуков нет, состояния нет. Запрос режется по пробелам, первые keep слов считаются основой, остальные помечаются data-extra и зачёркиваются. Блок объявлен role="status": пропажа результатов должна быть услышана. Подложка светлая и своя, поэтому карточка читается и на тёмном фоне витрины.
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 Empty003Props = Omit<
ComponentPropsWithoutRef<"div">,
"children" | "title"
> & {
query?: string
keep?: number
title?: string
text?: string
onAction?: () => void
accent?: string
}
// Идея компонента: пустой поиск, который разбирает сам запрос. Вместо совета
// «попробуйте иначе» слова запроса показаны чипами, а лишние — зачёркнуты:
// видно, что именно сузило выдачу до нуля. Главное действие ровно одно —
// повторить поиск по укороченному запросу.
const STYLES = `
:where([data-vibeui-block="empty-003"]){
--vibeui-empty-003-bg:oklch(1 0 0);
--vibeui-empty-003-fg:oklch(0.21 0.014 265);
--vibeui-empty-003-muted:oklch(0.55 0.014 265);
--vibeui-empty-003-border:oklch(0.91 0.006 265);
--vibeui-empty-003-accent:oklch(0.55 0.17 265);
--vibeui-empty-003-font:ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
}
[data-vibeui-block="empty-003"]{
display:flex;flex-direction:column;align-items:center;gap:0.5rem;
width:100%;max-width:24rem;box-sizing:border-box;padding:1.5rem 1.25rem;
text-align:center;
background:var(--vibeui-empty-003-bg);
border:1px solid var(--vibeui-empty-003-border);border-radius:1rem;
font-family:var(--vibeui-empty-003-font);color:var(--vibeui-empty-003-fg);
}
[data-vibeui-block="empty-003"] [data-part="label"]{
margin:0;font-size:0.6875rem;font-weight:700;letter-spacing:0.06em;text-transform:uppercase;
color:var(--vibeui-empty-003-muted);
}
/* Разбор запроса: лишние слова зачёркнуты, а не описаны словами. */
[data-vibeui-block="empty-003"] [data-part="words"]{
display:flex;flex-wrap:wrap;justify-content:center;gap:0.3125rem;margin:0.125rem 0 0.25rem;
}
[data-vibeui-block="empty-003"] [data-part="word"]{
padding:0.1875rem 0.5625rem;border-radius:9999px;
border:1px solid var(--vibeui-empty-003-border);
font-size:0.8125rem;font-weight:600;
}
[data-vibeui-block="empty-003"] [data-part="word"][data-extra="true"]{
color:var(--vibeui-empty-003-muted);text-decoration:line-through;
background:oklch(0.97 0.003 265);
}
[data-vibeui-block="empty-003"] [data-part="title"]{margin:0;font-size:1rem;font-weight:680;line-height:1.3}
[data-vibeui-block="empty-003"] [data-part="text"]{
margin:0;max-width:34ch;font-size:0.8125rem;line-height:1.5;color:var(--vibeui-empty-003-muted);
}
[data-vibeui-block="empty-003"] [data-part="action"]{
appearance:none;border:0;cursor:pointer;margin-top:0.5rem;
height:2.375rem;padding:0 1rem;border-radius:0.75rem;
background:var(--vibeui-empty-003-accent);color:oklch(0.99 0.01 265);
font:inherit;font-size:0.875rem;font-weight:650;
}
[data-vibeui-block="empty-003"] [data-part="action"]:focus-visible{outline:2px solid var(--vibeui-empty-003-accent);outline-offset:2px}
@media (prefers-reduced-motion:reduce){[data-vibeui-block="empty-003"] *{animation:none!important;transition:none!important}}
`
/**
* Пустой поиск с разбором запроса: лишние слова видно, действие одно.
* Один файл, ноль зависимостей, собственная палитра.
*/
export function Empty003({
query = "карточка товара с ценой и рейтингом",
keep = 2,
title = "Слишком точный запрос",
text = "Чем короче запрос, тем больше он находит. Уточнения лучше добавлять фильтрами, а не словами.",
onAction,
accent,
className,
style,
...props
}: Empty003Props) {
const palette = {
...(accent ? { "--vibeui-empty-003-accent": accent } : null),
...style,
} as CSSProperties
const words = query.trim().split(/\s+/).filter(Boolean)
const short = words.slice(0, Math.max(1, keep)).join(" ")
return (
<>
<style href="vibeui-empty-003" precedence="medium">
{STYLES}
</style>
<div
{...props}
data-vibeui-block="empty-003"
role="status"
className={className}
style={palette}
>
<p data-part="label">Ничего не нашлось по запросу</p>
<p data-part="words">
{words.map((word, index) => (
<span
key={`${word}-${index}`}
data-part="word"
data-extra={index >= Math.max(1, keep)}
>
{word}
</span>
))}
</p>
<h3 data-part="title">{title}</h3>
<p data-part="text">{text}</p>
<button type="button" data-part="action" onClick={onAction}>
Искать «{short}»
</button>
</div>
</>
)
}