Layout & Disclosure
@hacline/ui/scroll-areaScrollArea
Custom scrollable container built on @ui-sdk/react/scroll-area with native scrolling feel, unified scrollbars, and stickToEnd log auto-scrolling.
Import
import {
ScrollArea,
ScrollAreaContent,
ScrollAreaCorner,
ScrollAreaScrollbar,
ScrollAreaThumb,
ScrollAreaViewport,
} from "@/components/ui/hacline/components/scroll-area";Vertical Scrolling
By default, type="hover" fades in custom scrollbars on pointer hover or active scrolling and hides them automatically afterward.
v0.24.02026-01-01
v0.23.02026-02-01
v0.22.02026-03-01
v0.21.02026-04-01
v0.20.02026-05-01
v0.19.02026-06-01
v0.18.02026-07-01
v0.17.02026-08-01
v0.16.02026-09-01
v0.15.02026-10-01
v0.14.02026-11-01
v0.13.02026-12-01
v0.12.02026-01-01
v0.11.02026-02-01
v0.10.02026-03-01
v0.9.02026-04-01
v0.8.02026-05-01
v0.7.02026-06-01
v0.6.02026-07-01
v0.5.02026-08-01
v0.4.02026-09-01
v0.3.02026-10-01
v0.2.02026-11-01
v0.1.02026-12-01
<ScrollArea className="border-hl-border rounded-hl-lg h-52 border">
<ScrollAreaViewport aria-label="Release History" role="region">
<ScrollAreaContent className="p-3">
{/* Long list content */}
</ScrollAreaContent>
</ScrollAreaViewport>
<ScrollAreaScrollbar orientation="vertical">
<ScrollAreaThumb />
</ScrollAreaScrollbar>
</ScrollArea>Horizontal Scrolling
Set orientation="horizontal" with type="auto" to keep the scrollbar visible whenever content overflows horizontally.
Primary
Secondary
Danger
Success
Warning
Info
<ScrollArea className="border-hl-border rounded-hl-lg border" type="auto">
<ScrollAreaViewport aria-label="Semantic Palette" role="region">
<ScrollAreaContent className="flex w-max gap-3 p-4">
{/* Horizontal cards */}
</ScrollAreaContent>
</ScrollAreaViewport>
<ScrollAreaScrollbar orientation="horizontal">
<ScrollAreaThumb />
</ScrollAreaScrollbar>
</ScrollArea>Auto-Pinning Logs (stickToEnd)
When stickToEnd is enabled, the viewport tracks new content to the bottom automatically, pauses when the user scrolls up to inspect earlier lines, and resumes once scrolled back to the bottom.
[00:01] Initializing @hacline/ui build environment
[00:02] Loading --hl-* design tokens
[00:03] Starting interactive component preview
<ScrollArea
className="border-hl-border rounded-hl-lg h-36 border"
stickToEnd
type="auto"
>
<ScrollAreaViewport aria-label="Build Logs" role="region">
<ScrollAreaContent className="font-hl-mono p-3 text-xs">
{/* Dynamically appended log entries */}
</ScrollAreaContent>
</ScrollAreaViewport>
<ScrollAreaScrollbar orientation="vertical">
<ScrollAreaThumb />
</ScrollAreaScrollbar>
</ScrollArea>Props
Prop
Type