Display
Profile Header Skeleton
A profile header skeleton with its most fragile detail — the round avatar overlapping the cover: the overlap is computed from the same variable that sets the cover height.
- skeleton
- profile
- header
- display
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/skeleton-005?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 "skeleton-005" (Profile Header 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/skeleton-005.json
Registry item: https://vibeui.ru/r/skeleton-005.json
Installs to: components/vibeui/skeleton-005.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 profile header skeleton with its most fragile detail — the round avatar overlapping the cover: the overlap is computed from the same variable that sets the cover height.
A profile header skeleton: cover, overlapping avatar, name, bio and three stat tiles. Zero dependencies, one file, server rendered.
## 3. How to use it
import { Skeleton005 } from "@/components/vibeui/skeleton-005"
<Skeleton005 cover="5.5rem" label="Profile is loading" />
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-skeleton-005-* palette — do not swap it for your theme tokens
- the avatar overlap as a negative margin of its own diameter: otherwise changing the cover height breaks the frame
- the surface-coloured box-shadow ring — a border would grow the circle and shift the text
- the three equal stat columns: any other count diverges from the real header
- role="status" and aria-busy on the root, or the skeleton is silent to screen readers
- its own light surface: on a dark gallery the grey shapes are invisible otherwise
## 6. You may change
- the cover height through cover
- the screen-reader caption through label
- the avatar diameter through its size variable
- the name and bio bar widths in CSS
## 7. Rules
- The avatar diameter lives in a CSS variable: change it and the overlap recomputes itself.
- The skeleton must match the real header's height, otherwise the page jerks when data lands.
- The component draws no header action buttons: add them as a separate row if you have them.
- 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/skeleton-005.jsonhttps://vibeui.ru/r/skeleton-005.jsonКомпонент самодостаточен: один файл, без зависимостей, собственная палитра в локальных переменных --vibeui-skeleton-005-*. Серверный: хуков нет. Высота обложки объявлена переменной, а отрицательный margin аватара считается как половина его диаметра, поэтому при смене высоты каркас не разъезжается и настоящая шапка встаёт ровно на место заглушки. Кольцо вокруг аватара нарисовано box-shadow цветом подложки — это дешевле бордюра и не увеличивает размер круга. Метрики разложены сеткой из трёх равных колонок, столько же, сколько в настоящей шапке. Корень помечен role="status" и aria-busy; при 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 Skeleton005Props = ComponentPropsWithoutRef<"div"> & {
/** Высота обложки: под неё же считается наезд аватара. */
cover?: string
label?: string
}
// Идея компонента: заглушка шапки профиля повторяет её самую хрупкую деталь —
// круглый аватар, наезжающий на обложку. Наезд задан отрицательным margin от
// той же переменной, что и высота обложки, поэтому при смене высоты каркас не
// разъезжается и настоящая шапка встаёт ровно на место заглушки.
const STYLES = `
:where([data-vibeui-block="skeleton-005"]){
--vibeui-skeleton-005-bg:oklch(1 0 0);
--vibeui-skeleton-005-border:oklch(0.9 0.006 265);
--vibeui-skeleton-005-base:oklch(0.93 0.005 265);
--vibeui-skeleton-005-shine:oklch(0.97 0.003 265);
--vibeui-skeleton-005-cover:5.5rem;
--vibeui-skeleton-005-avatar:4.25rem;
}
[data-vibeui-block="skeleton-005"]{
width:100%;max-width:22rem;box-sizing:border-box;overflow:hidden;
background:var(--vibeui-skeleton-005-bg);
border:1px solid var(--vibeui-skeleton-005-border);border-radius:1rem;
}
[data-vibeui-block="skeleton-005"] [data-part="cover"],
[data-vibeui-block="skeleton-005"] [data-part="avatar"],
[data-vibeui-block="skeleton-005"] [data-part="bar"],
[data-vibeui-block="skeleton-005"] [data-part="stat"]{
background:linear-gradient(90deg,
var(--vibeui-skeleton-005-base) 0%,
var(--vibeui-skeleton-005-shine) 50%,
var(--vibeui-skeleton-005-base) 100%) 0 0 / 200% 100%;
animation:vibeui-skeleton-005-sweep 1.5s ease-in-out infinite;
}
[data-vibeui-block="skeleton-005"] [data-part="cover"]{
height:var(--vibeui-skeleton-005-cover);
}
[data-vibeui-block="skeleton-005"] [data-part="body"]{
display:flex;flex-direction:column;gap:0.625rem;padding:0 1.125rem 1.125rem;
}
/* Наезд аватара считается от той же переменной, что и высота обложки. */
[data-vibeui-block="skeleton-005"] [data-part="avatar"]{
width:var(--vibeui-skeleton-005-avatar);height:var(--vibeui-skeleton-005-avatar);
margin-top:calc(var(--vibeui-skeleton-005-avatar) / -2);
border-radius:9999px;
box-shadow:0 0 0 0.25rem var(--vibeui-skeleton-005-bg);
}
[data-vibeui-block="skeleton-005"] [data-part="bar"]{height:0.75rem;border-radius:0.25rem}
[data-vibeui-block="skeleton-005"] [data-part="bar"][data-size="name"]{width:52%;height:1.0625rem;margin-top:0.25rem}
[data-vibeui-block="skeleton-005"] [data-part="bar"][data-size="handle"]{width:34%;height:0.625rem}
[data-vibeui-block="skeleton-005"] [data-part="bar"][data-size="bio"]{width:100%}
[data-vibeui-block="skeleton-005"] [data-part="bar"][data-size="bio-last"]{width:68%}
/* Метрики — три равные колонки: столько же, сколько в настоящей шапке. */
[data-vibeui-block="skeleton-005"] [data-part="stats"]{
display:grid;grid-template-columns:repeat(3,1fr);gap:0.5rem;
margin-top:0.375rem;padding-top:0.75rem;
border-top:1px solid var(--vibeui-skeleton-005-border);
}
[data-vibeui-block="skeleton-005"] [data-part="stat"]{height:1.75rem;border-radius:0.5rem}
@keyframes vibeui-skeleton-005-sweep{
0%{background-position:120% 0}
100%{background-position:-20% 0}
}
@media (prefers-reduced-motion:reduce){
[data-vibeui-block="skeleton-005"] *{animation:none!important;transition:none!important}
[data-vibeui-block="skeleton-005"] [data-part="cover"],
[data-vibeui-block="skeleton-005"] [data-part="avatar"],
[data-vibeui-block="skeleton-005"] [data-part="bar"],
[data-vibeui-block="skeleton-005"] [data-part="stat"]{background:var(--vibeui-skeleton-005-base)}
}
`
/**
* Заглушка шапки профиля с аватаром, наезжающим на обложку.
* Один файл, ноль зависимостей, собственная палитра.
*/
export function Skeleton005({
cover = "5.5rem",
label = "Профиль загружается",
className,
style,
...props
}: Skeleton005Props) {
const palette = {
"--vibeui-skeleton-005-cover": cover,
...style,
} as CSSProperties
return (
<>
<style href="vibeui-skeleton-005" precedence="medium">
{STYLES}
</style>
<div
{...props}
data-vibeui-block="skeleton-005"
role="status"
aria-busy="true"
aria-label={label}
className={className}
style={palette}
>
<div data-part="cover" />
<div data-part="body">
<div data-part="avatar" />
<div data-part="bar" data-size="name" />
<div data-part="bar" data-size="handle" />
<div data-part="bar" data-size="bio" />
<div data-part="bar" data-size="bio-last" />
<div data-part="stats">
<span data-part="stat" />
<span data-part="stat" />
<span data-part="stat" />
</div>
</div>
</div>
</>
)
}