ScrollArea (ui/scroll-area.tsx)

open-agents · apps/web/components/ui/scroll-area.tsx · typescript · MIT
ui

Reusable scrollable container with customizable scrollbar for React apps

// Source: https://github.com/vercel-labs/open-agents | License: MIT | Copyright 2026 Vercel, Inc
// Provided via justclaw.it.com; keep this notice with the code.
"use client";

import * as React from "react";
import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area";

import { cn } from "@/lib/utils";

function ScrollArea({
  className,
  children,
  ...props
}: React.ComponentProps<typeof ScrollAreaPrimitive.Root>) {
  return (
    <ScrollAreaPrimitive.Root
      data-slot="scroll-area"
      className={cn("relative", className)}
      {...props}
    >
      <ScrollAreaPrimitive.Viewport
        data-slot="scroll-area-viewport"
        className="focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visib

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key