Components
HorizontalScroll
Converts vertical scroll into horizontal movement with full-viewport panels.
Overview
<HorizontalScroll> converts vertical scroll into horizontal movement. Wrap <Panel> components inside it to create horizontally-scrolling sections.
Usage
<HorizontalScroll> Props
| Prop | Type | Default | Description |
|---|---|---|---|
children | ReactNode | -- | <Panel> components |
className | string | -- | CSS class for the outer spacer |
panelHeight | string | "100vh" | Height of each panel as a CSS string |
<Panel> Props
| Prop | Type | Default | Description |
|---|---|---|---|
children | ReactNode | -- | Panel content |
className | string | -- | CSS class |
style | CSSProperties | -- | Inline styles (merged with default 100vw x 100vh sizing) |
How it works
The spacer height is automatically set to childCount * 100vh, giving each panel a full viewport of scroll distance. Vertical scroll is translated into a horizontal translateX on the inner container.