Scroll Area
A styled scroll container with custom scrollbars and behavior, useful for containing overflowing content in a clean, controlled manner.
Usage
Basic usage example to quickly see how the ScrollArea
works.
Peer Dependencies
Install required dependencies before using the ScrollArea
.
These libraries handle the low-level mechanics to ensure smooth performance.
Properties
Interactive configurator to explore customization options for the ScrollArea
component.
Size
Color
API References
Scroll Area uses @radix-ui
under the hood. For a full list of supported props and advanced usage:
Styles API
type T = "root" | "viewport" | "scrollbar" | "thumb" | "corner";
Styles API | Type | Default | Annotation |
---|---|---|---|
className? | string | undefined | Pass to root component <p> |
classNames? | Partial<Record<T, string>> | undefined | |
style? | CSSProperties | undefined | Pass to root component <p> |
styles? | Partial<Record<T, CSSProperties>> | undefined | |
unstyled? | Partial<Record<T, boolean>> | undefined | |
color? | Color | { thumb?: Color; track?: Color } | hsl(var(--muted)) | Passed to thumb | track component |
Props API
Props API | Type | Default | Annotation |
---|---|---|---|
unstyled? | boolean | false | if true , all default styles will be removed |
Source Codes
Full working code example, including necessary markup and styles. You can copy and paste this code directly to start using the component immediately.