Opens in a new tab

Blog Stack

Templates5 minutes readUpdated 5 Oct 2026

This article documents

Blog Stack Pro

Cards · GSAP + ScrollTrigger

A latest-articles row that folds into a deck as you scroll. The cards start as one flat row running off the right of the screen; the section pins, and the cards slide back one at a time, each landing on top of the one before and leaving a strip of it in view, until the last card parks at the right edge. Hovering a covered card widens it so more of it shows. Under 992px it is a native swipeable row.

Requires: GSAP core, ScrollTrigger.

Adding and removing cards#

Every bxb__item directly inside bxb__track is a card, in order. Duplicate one and it joins the deck; delete one and the rest re-space. There is nothing else to set.

Unlike a template that adds scroll per step, the length of the pin stays the same however many cards there are: five cards means four slides back over the same distance, so more cards means each one moves faster. Change data-distance if a longer row feels rushed.

The card colours cycle in threes by position, so a duplicated card takes the next colour in the cycle on its own.

Using your posts#

The five cards are static. To fill the row from your posts, enable a Query Loop on Card 1 - Designing in the browser, not around it (enable Query Loop here) and delete Cards 2 to 5. Each loop item is a card, so the deck, the colour cycle and the clickable card all keep working. Then set the card’s fields to dynamic data:

ElementDynamic data
Card titleBlog Stack
ExcerptA latest-articles row that pins and folds into a deck of cards as you scroll, and how to fill, tune and restyle it., or any length you like
DateOctober 1, 2026
Both tagsA terms tag ending in :plain, for example . Without :plain the terms are links, and a link inside the card’s own link breaks the card.
The read article linkLink to https://bricksify.danielraison.it/docs/templates/blog-stack/, and its aria-label to Read article: Blog Stack

What you replace#

In the structure panelWhat to do
Section titleYour words
Card title, Excerpt, Date on each cardYour article
Tag (shown under 992px), Tag (992px and up)The same tag in both. The card shows the first under the title on small screens and the second in the footer on large ones.
Read article link (the whole card is clickable; in a loop set Link to https://bricksify.danielraison.it/docs/templates/blog-stack/)Your article’s URL, and its aria-label under Attributes, for example Read article: Designing in the browser, not around it. The link stretches over the whole card, so the card is one click target.
Card surface (set a Background here to override the colour cycle)Leave it, or give one card its own background
Dot (decorative)Leave it, or delete it. It is aria-hidden.

There are no pictures in this template: the cards are text only, so there is nothing to import.

Classes#

Root marker bxc-blog-stack, plus the bsfy-blog-stack global class, which holds the layout. The section also carries bx-lib-gsap and bx-lib-scrolltrigger, which tell the companion plugin which libraries this page needs. Leave all of them. See The marker-class contract.

The card type is set in three more global classes, so you change it once for every card: bsfy-blog-stack-card-title, bsfy-blog-stack-card-text (the excerpt) and bsfy-blog-stack-card-meta (tags, date and link).

The script reads .bxb__viewport, .bxb__track, every .bxb__item directly inside the track, and the .bxb__card in each. While the deck is running it adds is-stacking to the section, and removes it when the screen drops below 992px.

Tuning#

On the section, under Attributes:

AttributeShippedWhat it does
data-distance400Length of the pin, as a percentage of the viewport height, for the whole deck
data-advance0.8How far each card slides back, in card widths. 0.8 leaves a fifth of the card beneath in view.
data-scrubautoHow long, in seconds, the cards take to catch up with the scrollbar. auto is 1 second, or ties them directly when the page already smooth-scrolls (see Smooth scroll), so the motion is never smoothed twice. 0 always ties them directly.
data-easepower1.outGSAP easing of each slide back
data-hover1Widen a covered card on hover. 0 switches it off.

The hover widens a card by a tenth of its width towards the left, in 0.4 seconds, and only while the next card covers it. The first and last cards never widen, and it only runs on devices with a mouse or trackpad.

Restyling#

The section padding and background and the section title typography are element settings in the panel, set separately per breakpoint. The card typography is on the three typed global classes above.

On the bsfy-blog-stack class:

PropertyDefaultWhat it does
--bxb-w, --bxb-h44.167vw, 24.7396vwCard width and height. 39.063vw by 52.083vw at 991px and below, 83.333vw by 111.111vw at 478px and below.
--bxb-pad2.0833vwPadding inside a card
--bxb-body31vwWidth of the title and excerpt inside a card
--bxb-dot.9375vwSize of the decorative dot
--bxb-inset2.0833vwSpace before the first card and the title on the left, and after the last card once the deck has folded
--bxb-card-1, --bxb-card-2, --bxb-card-3#DFE3EF, #EBF0FF, #FFFFFFThe three card colours, in turn. Each reads your --color-border, --color-surface-sunk and --color-surface first if you have them.

The card corners use --radius-card, 20px if you do not set it.

Without JavaScript#

The cards stay in their flat row, and the row is a native horizontal scroller you can swipe or scroll. Every card is readable and clickable. Below 992px this is also what everyone gets, with a small gap between cards.

Reduced motion#

No pin and no deck. The section is the same horizontal scroller as without JavaScript, at every screen size. See Reduced motion.