Scroll area
A box that scrolls with thin scrollbars over its edge, which show while you use it, and edges that fade while there is more past them.
npx shadcn add https://kinoui.com/r/scroll-area.jsonCopy install command
Examples
Default
Give it a height and it scrolls what is taller. Its scrollbar shows while the pointer is over it, and the bottom edge fades while there is more below.
Horizontal
Content wider than the box scrolls sideways, with its bar along the bottom. Make the row as wide as its items with w-max.
Both ways
Content larger both ways scrolls both ways, with a bar on each side and every edge fading.
Installation
Copy code
npx shadcn@latest add https://kinoui.com/r/scroll-area.json- Files
lib/reduce-motion.tslib/scroll.tscomponents/kino/scroll-area.tsx- Packages
@base-ui/react- Global CSS
- the feels, the density tokens, the shape tokens and the success and warning colours
New to Kino? Installation covers what your project needs first and the @kino namespace.
API reference
Props
Data attributes
Accessibility
- While its content is larger than it, the part that scrolls takes focus as a region, so the arrow keys, Page Up, Page Down, Home and End scroll it. Name it with
aria-labelledbyoraria-label. Content that fits leaves the tab order. - The scrollbars are hidden from screen readers, as the browser’s own are. You can drag a thumb or press the track to jump.
- In forced colours the thumbs take the system’s text colour, so they stay visible.
- The scrollbars only fade, so they look the same when the system asks for less motion.