scroll/01-basic-scroll
Vertically scrollable list of skeleton rows with a fade mask to hint at overflow content.
Loading interactive preview
import { Scroll } from 'ui-lab-components/scroll';
import { Skeleton } from 'ui-lab-components/skeleton';
const LINE_WIDTHS = ['92%', '78%', '85%', '60%', '95%', '70%', '88%', '55%', '90%', '75%'];
export default function Example() {
return (
<div className="overflow-hidden rounded-sm">
<Scroll max-height="200px" fade-y fade-distance={8} fade-size={5}>
<div
className="flex flex-col gap-3 p-4"
style={{ '--background': 'var(--background-700)' } as React.CSSProperties}
aria-hidden="true"
>
{LINE_WIDTHS.map((w, i) => (
<Skeleton.Text key={i} lines={1} w={w} />
))}
</div>
</Scroll>
</div>
);
}