Headline Photo Pills
This article documents
Headline Photo Pills Pro
A one-screen section with a large centred headline and three small photos tucked between the words. As it scrolls in, the lines rise out of their masks and each photo slot pops in as a dot, then stretches into a pill that pushes the words apart while the photo settles from a zoom. While the page scrolls, the photos drift gently inside their pills. Scrolling back above it plays it backwards.
Requires: the Bricksify companion plugin for the animation (Text Roll widget, Mask rise effect: GSAP, ScrollTrigger, SplitText, CustomEase, loaded automatically). Without it the text is simply shown. Pro template.
How it is built#
The headline is a Block with the custom tag h2 and Display block. Inside it, Basic Text elements (tag span) hold the words and three Divs (tag span, class bxiih-slot) each hold a Bricks Image: the photo slots. Every direct child that holds an image becomes a slot, so you can move, duplicate or delete slots freely.
Settings#
On the Headline Block, group Text Roll: mask rise (Bricksify):
| Setting | Value | What it does |
|---|---|---|
| Duration / Stagger | 1.2s / 0.12s | Each line rises in 1.2s, 0.12s after the one above; a pill takes 1.2s to open. |
| Easing | Glide | Quick lift, long soft landing (cubic 0.3, 0.9, 0.1, 1). |
| Start inside viewport | 20% | Plays when the top of the headline reaches 80% of the screen. |
| Repeat | Play backwards when scrolled back | Or once. |
| Lock to the scroll | Off | On: follows the scrollbar until the headline top reaches 35% of the screen, smoothed 0.6s. |
| Slot width / height / radius | 1.7em / 0.72em / 0.36em | In em of the headline size, per breakpoint. |
| Photo drift | 8% | Drift of the photos inside the pills while scrolling, each at its own pace (x1, x0.6, x1.3). 0 = still. |
What you replace#
| In the structure panel | What to do |
|---|---|
Words 1-4 | Your words (Basic Text, tag span). The space next to a photo is the slot margin (0.2em) in class bxiih-slot. |
Photo 1-3 | Swap the image in the Image element and update its alt text. |
Photo slot | Duplicate to add a photo, delete to remove one. |
Responsive#
Headline clamp(88px, 7vw, 120px), 64px at 991px, 50px at 767px, 40px at 478px; weight 300, line height 1.02, max width 14em, balanced lines. The slots are sized in em, so they scale with the text. Section padding 96px / 40px, 64px / 20px at 767px, at least one screen tall. The lines are measured again whenever the width changes; a finished reveal stays finished.
Reduced motion#
With prefers-reduced-motion (and without JavaScript) the headline is shown with its photo slots open, nothing moves.