Components
Scroll Area
A region with styled scrollbars that scrolls with the keyboard when its content overflows.
Ombelle · light
Scroll Area
Installation
Run in a project initialized with an Ombelle preset (see Get started). The component uses the saved project preset. Run the command from your app folder; it shows the changes and asks before writing.
pnpm dlx @ombelle-ui/cli@1.1.2 add scroll-areaAdds components/ui/scroll-area.tsx and installs react, @radix-ui/react-scroll-area, clsx, tailwind-merge with lifecycle scripts disabled. This is a client component.
In a liquid glass project the plan adds a notice that accessibility is not guaranteed, because text contrast depends on the background behind the glass.
Usage
example.tsx
import { ScrollArea } from '@/components/ui/scroll-area'
export function Example(){return <ScrollArea aria-label="Components" style={{ blockSize: 200 }}><ul><li>Accordion</li><li>Alert</li><li>Alert Dialog</li><li>Avatar</li><li>Badge</li><li>Breadcrumb</li></ul></ScrollArea>}API and states
- API
- ScrollArea (className, style), ScrollBar (orientation vertical or horizontal)
- Minimum states
- Fits, overflowing, scrolling, focus
- Native basis
- Radix Scroll Area; Base UI Scroll Area in the Base UI edition
- Styles
- Stable in Ombelle, Papier, Organic, Retro futurism, minimalist, neo-brutalism and flat, light and dark. Liquid glass: stable, accessibility not guaranteed.