import { ScrollArea } from "@/registry/ui/scroll-area"
export default function ScrollAreaDemo() {
return (
UI
UI Library Discussion
3 participants
{[
{
user: "Alex",
message: "Has anyone used the new ScrollArea component?",
time: "10:15 AM",
isCurrentUser: false,
},
{
user: "Taylor",
message:
"Yes, I've been using it for a dashboard project. It works great with complex layouts.",
time: "10:17 AM",
isCurrentUser: false,
},
{
user: "You",
message:
"I just integrated it into our design system. The auto-hiding scrollbar is a nice touch!",
time: "10:20 AM",
isCurrentUser: true,
},
{
user: "Alex",
message: "Can it handle horizontal scrolling as well?",
time: "10:22 AM",
isCurrentUser: false,
},
{
user: "You",
message:
"Yes, it supports both vertical and horizontal scrolling out of the box. You can also customize the scrollbar's appearance and behavior.",
time: "10:25 AM",
isCurrentUser: true,
},
{
user: "Taylor",
message:
"I found the alwaysShowScrollbar prop useful for touch devices where users might not know content is scrollable otherwise.",
time: "10:27 AM",
isCurrentUser: false,
},
{
user: "Alex",
message: "Does it handle window resize events properly?",
time: "10:30 AM",
isCurrentUser: false,
},
{
user: "You",
message:
"Yes, it updates appropriately on window resize. The component also manages scroll position effectively when content changes.",
time: "10:32 AM",
isCurrentUser: true,
},
{
user: "Taylor",
message:
"The fade-in/fade-out animations are smooth. I like how it doesn't distract from the content.",
time: "10:35 AM",
isCurrentUser: false,
},
{
user: "Alex",
message: "Any performance issues with larger content?",
time: "10:37 AM",
isCurrentUser: false,
},
{
user: "You",
message:
"It performs well even with very long content. It's built on Radix UI primitives, which are optimized for performance.",
time: "10:40 AM",
isCurrentUser: true,
},
].map((message, index) => (