Menu
All plugins

Stacking Cards for Bricks

Stacking Cards is a nestable element. Each child is a card; as the visitor scrolls, every card sticks a little lower than the one before and the next one slides over it.

Version: 0.1.0 · Requires: Bricks Builder, WordPress 6.5+ and PHP 8.1+ · See the live demo

Please note: this is an early release. It has been run on this playground but not yet tested widely, so stage & back up before using it on a live site.

Using it

  1. Add Stacking Cards (Layout group).
  2. Put one Block or Container inside for each card, with any content.
  3. Set the offset, gap and minimum height.

Controls

  • Stacking: distance from the top of the screen, stacking offset, space between cards, minimum height, and optionally stacking on desktop only.
  • Pile effect: sideways and vertical offset, scale decrease for cards behind, rotation, alternating left and right, and narrowing per card.
  • Cards: background, padding, border and shadow. Corners are square by default.

Behaviour

Built on CSS position: sticky, so there are no scroll listeners. Reduced motion turns stacking off and the cards flow normally.

Limitations

  • No ancestor may have overflow: hidden or sticky stops working.
  • Without JavaScript the first twelve cards still stack; the pile effect needs JavaScript.

Styling

Variables: --stc-top, --stc-offset, --stc-gap, --stc-min, --stc-bg, --stc-px, --stc-py, --stc-scale, --stc-rot and --stc-shrink.

Changelog

  • 0.1.0 — first release.