Velocity X Components

Bento & Layout

Sticky Sidebar + Scrolling Content

Pinned sidebar with its own internal scroll next to a scrolling main content column, desktop only.

Subscription Included with the Velocity Components subscription.
bash
$ velocityx add sticky-sidebar-layout

Built for astro.

Full docs for Sticky Sidebar + Scrolling Content →

Needs a licence key — subscribe here, then velocityx loginonce.

astro v1.0.0
Sticky Sidebar + Scrolling Content

Getting started

Section 1 of the scrolling docs body — the sidebar stays pinned at a 16px offset while this column scrolls underneath it.

Section 2 of the scrolling docs body — the sidebar stays pinned at a 16px offset while this column scrolls underneath it.

Section 3 of the scrolling docs body — the sidebar stays pinned at a 16px offset while this column scrolls underneath it.

Section 4 of the scrolling docs body — the sidebar stays pinned at a 16px offset while this column scrolls underneath it.

Props

NameTypeRequiredDefaultDescription
as'div' | 'section'No'div'
sidebarSide'left' | 'right'No'left'
sidebarWidthstringNo'280px'
stickyTopOffsetstringNo'24px'
gap6 | 8 | 10 | 12No10
classNamestringNo''

File this creates

The CLI writes this path into your project, relative to its root — nothing else moves.

text
components/velocity/sticky-sidebar-layout/StickySidebarLayout.astro

Using the Sticky Sidebar + Scrolling Content component

Install it with velocityx add sticky-sidebar-layout. The CLI writes the source straight into your project — no runtime dependency, no registry lock-in, and it themes itself from the same primary-*/accent-* scale as the rest of the library.

More from Bento & Layout.