Scroll shadow
A scrolling box whose edges fade where there is more to read.
A scrolling box whose edges fade where there is more to read.
npm install @heroui/react
First time with HeroUI? Set it up once.
/**
* Demo from HeroUI, https://heroui.com (docs example scroll-shadow/default.tsx).
* Apache-2.0, Copyright 2025 NextUI Inc. Full text: https://github.com/heroui-inc/heroui/blob/main/LICENSE
* Changed for Tastebud: a default export (HeroUI's docs use named ones).
*/
import {ScrollShadow} from "@heroui/react";
export default function ScrollShadowDemo() {
return (
<div className="w-full p-0 sm:max-w-sm">
<ScrollShadow className="max-h-[240px] p-4">
<div className="space-y-4">
{Array.from({length: 10}).map((_, idx) => (
<p key={`scroll-shadow-lorem-content-${idx}`}>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam pulvinar risus non
risus hendrerit venenatis. Pellentesque sit amet hendrerit risus, sed porttitor quam.
Morbi accumsan cursus enim, sed ultricies sapien.
</p>
))}
</div>
</ScrollShadow>
</div>
);
}
Changed for this site: A default export (HeroUI's docs use named ones).