apps/v4/content/docs/components/radix/scroll-area.mdx
<ComponentPreview styleName="radix-nova" name="scroll-area-demo" previewClassName="h-96" />
npx shadcn@latest add scroll-area
<Step>Install the following dependencies:</Step>
npm install radix-ui
<Step>Copy and paste the following code into your project.</Step>
<ComponentSource name="scroll-area" title="components/ui/scroll-area.tsx" styleName="radix-nova" />
<Step>Update the import paths to match your project setup.</Step>
</Steps> </TabsContent> </CodeTabs>import { ScrollArea, ScrollBar } from "@/components/ui/scroll-area"
<ScrollArea className="h-[200px] w-[350px] rounded-md border p-4">
Your scrollable content here.
</ScrollArea>
Use ScrollBar with orientation="horizontal" for horizontal scrolling.
To enable RTL support in shadcn/ui, see the RTL configuration guide.
<ComponentPreview styleName="radix-nova" name="scroll-area-rtl" direction="rtl" previewClassName="h-auto" />
See the Radix UI Scroll Area documentation.