Basic Usage
Horizontal Scrolling
Component Structure
For more control, use the component parts:Both Scrollbars
Props Reference
High-Level Props
Orientation of the scroll area
Whether to keep the scrollbar HTML element in the DOM when the viewport isn’t scrollable
Scrollbar Props
Orientation of the scrollbar
Whether to keep the HTML element in the DOM when the viewport isn’t scrollable
Additional CSS classes for styling
Styling
From source code atreflex_ui/components/base/scroll_area.py:16-26:
- Root: Full height with no outline
- Viewport: Full height with overscroll containment
- Scrollbar: Touch-friendly with smooth opacity transitions, appears on hover or scrolling
- Thumb: Rounded with secondary alpha color
- Corner: Small rectangular area at scrollbar intersection
- Opacity transitions with 200ms delay
- 0ms delay when hovering or scrolling
- 100ms duration for smooth appearance
Implementation Details
From source code atreflex_ui/components/base/scroll_area.py:153-190:
- High-level API automatically creates root, viewport, content, and scrollbar
- Scrollbars automatically show/hide based on content overflow
- Thin scrollbar styling with
scrollbar-width:thin - Supports both horizontal and vertical scrolling
- Optional corner element for dual-scrollbar layouts