Card
Card Skeleton
A product-card skeleton: a square cover and lines of matching length — matching the metrics is the whole point.
- card
- skeleton
- loading
- grid
Preview
1440pxHost theme
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/card-010?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 "card-010" (Card Skeleton) 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/card-010.json
Registry item: https://vibeui.ru/r/card-010.json
Installs to: components/vibeui/card-010.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 product-card skeleton: a square cover and lines of matching length — matching the metrics is the whole point.
A card skeleton: a square cover and lines mirroring the metrics of the real product card. Zero dependencies, one file, no client JS.
## 3. How to use it
import { Card010 } from "@/components/vibeui/card-010"
<Card010 label="Loading a product card" lines={3} />
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-card-010-* palette — do not swap it for your theme tokens (bg-muted, animate-pulse and the like)
- matching the real card's metrics: otherwise the content jumps on arrival
- the varying line lengths — equal ones read as a table
- role="status" and aria-busy: without them loading does not exist for a screen reader
- the staggered shimmer across the lines
- the prefers-reduced-motion rule that stops the shimmer
## 6. You may change
- label — what is loading
- lines — how many lines
- media — whether to show the cover
- the width for your grid
## 7. Rules
- The placeholder count should match the expected cards: eight before two reads as a bug.
- If the response takes more than a couple of seconds, a skeleton is not enough: show progress or a reason.
- The metrics are tied to card-004: change the real card and fix the skeleton too.
- 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/card-010.jsonhttps://vibeui.ru/r/card-010.jsonКомпонент самодостаточен: один файл, без зависимостей, собственная палитра в локальных переменных --vibeui-card-010-*. Серверный: хуков нет. Пропорции повторяют card-004: квадратная обложка, две строки заголовка и короткая строка цены. Блик — движущийся градиент с задержкой по строкам; в prefers-reduced-motion он снимается, а фигуры заливаются ровным тоном.
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 Card010Props = Omit<ComponentPropsWithoutRef<"div">, "children"> & {
label?: string
lines?: number
media?: boolean
}
// Идея компонента: заглушка карточки под настоящую. Пропорции повторяют
// card-004: обложка квадратом, две строки заголовка, короткая строка цены.
// Совпадение метрик и есть смысл заглушки — иначе при загрузке содержимое
// прыгает, и это раздражает сильнее, чем пустое место.
const STYLES = `
:where([data-vibeui-block="card-010"]){
--vibeui-card-010-bg:oklch(1 0 0);
--vibeui-card-010-border:oklch(0.91 0.006 265);
--vibeui-card-010-base:oklch(0.93 0.005 265);
--vibeui-card-010-shine:oklch(0.97 0.003 265);
}
[data-vibeui-block="card-010"]{
display:flex;flex-direction:column;gap:0.5rem;
width:100%;max-width:15rem;box-sizing:border-box;padding:0.75rem;
background:var(--vibeui-card-010-bg);
border:1px solid var(--vibeui-card-010-border);border-radius:0.875rem;
}
[data-vibeui-block="card-010"] [data-part="media"],
[data-vibeui-block="card-010"] [data-part="line"]{
background:
linear-gradient(90deg,var(--vibeui-card-010-base) 0%,var(--vibeui-card-010-shine) 50%,var(--vibeui-card-010-base) 100%)
0 0 / 200% 100%;
animation:vibeui-card-010-sweep 1.4s ease-in-out infinite;
}
/* Обложка квадратом: те же метрики, что у настоящей карточки товара. */
[data-vibeui-block="card-010"] [data-part="media"]{aspect-ratio:1 / 1;border-radius:0.625rem}
[data-vibeui-block="card-010"] [data-part="line"]{height:0.6875rem;border-radius:9999px}
[data-vibeui-block="card-010"] [data-part="line"]:nth-of-type(1){width:92%}
[data-vibeui-block="card-010"] [data-part="line"]:nth-of-type(2){width:64%}
[data-vibeui-block="card-010"] [data-part="line"]:nth-of-type(3){width:40%;height:0.875rem;margin-top:0.125rem}
[data-vibeui-block="card-010"] [data-part="line"]:nth-of-type(2){animation-delay:.12s}
[data-vibeui-block="card-010"] [data-part="line"]:nth-of-type(3){animation-delay:.24s}
@keyframes vibeui-card-010-sweep{
0%{background-position:120% 0}
100%{background-position:-20% 0}
}
@media (prefers-reduced-motion:reduce){
[data-vibeui-block="card-010"] *{animation:none!important;transition:none!important}
[data-vibeui-block="card-010"] [data-part="media"],
[data-vibeui-block="card-010"] [data-part="line"]{background:var(--vibeui-card-010-base)}
}
`
/**
* Заглушка карточки: обложка и строки повторяют метрики настоящей.
* Один файл, ноль зависимостей, собственная палитра.
*/
export function Card010({
label = "Загружается карточка товара",
lines = 3,
media = true,
className,
style,
...props
}: Card010Props) {
return (
<>
<style href="vibeui-card-010" precedence="medium">
{STYLES}
</style>
<div
{...props}
data-vibeui-block="card-010"
className={className}
style={style as CSSProperties}
role="status"
aria-busy="true"
aria-label={label}
>
{media ? <span data-part="media" /> : null}
{Array.from({ length: Math.max(1, lines) }, (_, index) => (
<span key={index} data-part="line" />
))}
</div>
</>
)
}