--- title: Scroll Area description: Augments native scroll functionality for custom, cross-browser styling. base: base component: true links: doc: https://base-ui.com/react/components/scroll-area api: https://base-ui.com/react/components/scroll-area#api-reference --- ## Installation Command Manual ```bash npx shadcn@latest add scroll-area ``` Install the following dependencies: ```bash npm install @base-ui/react ``` Copy and paste the following code into your project. Update the import paths to match your project setup. ## Usage ```tsx showLineNumbers import { ScrollArea } from "@/components/ui/scroll-area" ``` ```tsx showLineNumbers Your scrollable content here. ``` ## Examples ### Horizontal Use `ScrollBar` with `orientation="horizontal"` for horizontal scrolling. ## RTL To enable RTL support in shadcn/ui, see the [RTL configuration guide](/docs/rtl). ## API Reference See the [Base UI Scroll Area](https://base-ui.com/react/components/scroll-area#api-reference) documentation.