Gallery

Horizontal strips inside a page that scrolls vertically. On a touch screen a vertical swipe over a strip scrolls the page, a horizontal one drags the strip.

Free gallery

direction: 'horizontal'. Links open on click and stay closed after a drag. Vertical wheel over the strip scrolls the page; horizontal wheel and trackpad swipes move the strip until its edge.

Carousel with snap

snap stops on a slide where inertia would end, buttons use scrollBy().

Tabs

The selected tab is centered with scrollIntoView(tab, { align: 'center' }). With wheel: 'horizontal' the mouse wheel scrolls the tabs, past their end it scrolls the page.

Right-to-left

A viewport with dir="rtl": content starts at the right edge, position.x grows to the left, arrow keys follow the reading direction.