Display
Scroll Area
A scroll area with masked edges: the fade is the only honest sign that the list continues.
- scroll
- list
- mask
- overflow
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/scrollarea-001?lang=en
Recent components10
- button-001 · Action Button
- button-013 · Segmented Control
- calendar-002 · Range Picker
- card-004 · Product Card
- carousel-004 · Logo Marquee
- checkbox-003 · Parent Checkbox
- chart-007 · Gauge
- menu-003 · Menubar
- input-005 · Phone Field
- toast-002 · Undo Toast
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 "scrollarea-001" (Scroll Area) 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/scrollarea-001.json
Registry item: https://vibeui.ru/r/scrollarea-001.json
Installs to: components/vibeui/scrollarea-001.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 scroll area with masked edges: the fade is the only honest sign that the list continues.
A fixed-height scrollable list: a header with a counter, masked edges and striped rows. Zero dependencies, one file, no client JS.
## 3. How to use it
import { Scrollarea001 } from "@/components/vibeui/scrollarea-001"
<Scrollarea001 title="Recent" items={items} height="12rem" />
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-scrollarea-001-* palette — do not swap it for your theme tokens
- the edge mask: a clipped row otherwise reads as the last one
- the visible scrollbar: hiding it removes the second cue and the drag affordance
- tabIndex and role="group" on the area — otherwise it cannot be scrolled by keyboard
- overscroll-behavior: contain so the scroll does not escape to the page
- the counter in the header: it says how many rows exist
## 6. You may change
- title and the items array
- height — the area's height
- the row striping
- the block width
## 7. Rules
- There is no virtualisation: thousands of rows need a different component.
- The mask paints over content: keep interactive elements away from the edges.
- The height is fixed: a short list leaves empty space — choose it deliberately.
- 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/scrollarea-001.jsonhttps://vibeui.ru/r/scrollarea-001.jsonКомпонент самодостаточен: один файл, без зависимостей, собственная палитра в локальных переменных --vibeui-scrollarea-001-*. Серверный: хуков нет. Края подтёрты mask-градиентом сверху и снизу, высота задаётся переменной. Область получает tabIndex и role="group" с именем: иначе с клавиатуры её не прокрутить. Полоса прокрутки остаётся видимой.
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 Scrollarea001Props = Omit<
ComponentPropsWithoutRef<"div">,
"children" | "title"
> & {
title?: string
items?: string[]
height?: string
}
// Идея компонента: область прокрутки с подтёртыми краями. Тень у границы —
// единственный честный признак, что список продолжается; без неё обрезанная
// строка читается как последняя. Полоса прокрутки остаётся видимой: спрятать
// её значит убрать второй признак и возможность тащить мышью.
const STYLES = `
:where([data-vibeui-block="scrollarea-001"]){
--vibeui-scrollarea-001-bg:oklch(1 0 0);
--vibeui-scrollarea-001-fg:oklch(0.24 0.014 265);
--vibeui-scrollarea-001-muted:oklch(0.56 0.014 265);
--vibeui-scrollarea-001-border:oklch(0.9 0.006 265);
--vibeui-scrollarea-001-height:12rem;
--vibeui-scrollarea-001-font:ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
}
[data-vibeui-block="scrollarea-001"]{
display:flex;flex-direction:column;
width:100%;max-width:20rem;box-sizing:border-box;overflow:hidden;
background:var(--vibeui-scrollarea-001-bg);
border:1px solid var(--vibeui-scrollarea-001-border);border-radius:0.875rem;
font-family:var(--vibeui-scrollarea-001-font);color:var(--vibeui-scrollarea-001-fg);
}
[data-vibeui-block="scrollarea-001"] [data-part="head"]{
display:flex;align-items:center;justify-content:space-between;gap:0.5rem;
padding:0.625rem 0.875rem;border-bottom:1px solid var(--vibeui-scrollarea-001-border);
font-size:0.8125rem;font-weight:650;
}
[data-vibeui-block="scrollarea-001"] [data-part="count"]{font-weight:500;color:var(--vibeui-scrollarea-001-muted);font-size:0.75rem}
/* Края подтёрты маской: обрезанная строка иначе читается как последняя. */
[data-vibeui-block="scrollarea-001"] [data-part="area"]{
height:var(--vibeui-scrollarea-001-height);overflow-y:auto;overscroll-behavior:contain;
scrollbar-width:thin;
mask:linear-gradient(to bottom,transparent,oklch(0 0 0) 0.75rem,oklch(0 0 0) calc(100% - 0.75rem),transparent);
}
[data-vibeui-block="scrollarea-001"] ul{margin:0;padding:0.375rem;list-style:none}
[data-vibeui-block="scrollarea-001"] li{
display:flex;align-items:center;min-height:2rem;padding:0 0.5rem;
border-radius:0.5rem;font-size:0.8125rem;
}
[data-vibeui-block="scrollarea-001"] li:nth-child(odd){background:oklch(0.975 0.002 265)}
@media (prefers-reduced-motion:reduce){[data-vibeui-block="scrollarea-001"] *{animation:none!important;transition:none!important}}
`
const DEFAULT_ITEMS = [
"button-001 · Action Button",
"button-013 · Segmented Control",
"calendar-002 · Range Picker",
"card-004 · Product Card",
"carousel-004 · Logo Marquee",
"checkbox-003 · Parent Checkbox",
"chart-007 · Gauge",
"menu-003 · Menubar",
"input-005 · Phone Field",
"toast-002 · Undo Toast",
]
/**
* Область прокрутки с подтёртыми краями и видимой полосой.
* Один файл, ноль зависимостей, собственная палитра.
*/
export function Scrollarea001({
title = "Последние компоненты",
items = DEFAULT_ITEMS,
height = "12rem",
className,
style,
...props
}: Scrollarea001Props) {
const palette = {
"--vibeui-scrollarea-001-height": height,
...style,
} as CSSProperties
return (
<>
<style href="vibeui-scrollarea-001" precedence="medium">
{STYLES}
</style>
<div
{...props}
data-vibeui-block="scrollarea-001"
className={className}
style={palette}
>
<div data-part="head">
<span>{title}</span>
<span data-part="count">{items.length}</span>
</div>
<div data-part="area" tabIndex={0} role="group" aria-label={title}>
<ul>
{items.map((item) => (
<li key={item}>{item}</li>
))}
</ul>
</div>
</div>
</>
)
}