Platform
VaultVault
  • Free15
  • Navigation19
  • Buttons9
  • Scroll55
  • Text27
  • Sliders & marquees19
  • Gallery & images67
  • Cursor24
  • Page transitions10
  • Loaders2
  • Backgrounds10
  • UI components33
ButtonsPart of ProButtons
IconsPart of ProIcons
  • Interface Essentials144
  • Social Icons69
  • Payment Badges41
SavedPart of ProSaved
Support
DocumentationDocumentation
MCP serverMCP server
SettingsSettings
VaultTextInline Image Heading
Cursor SmokeBrowse all 182Jelly Button
  • Free15
  • Navigation19
  • Buttons9
  • Scroll55
  • Text27
  • Sliders & marquees19
  • Gallery & images67
  • Cursor24
  • Page transitions10
  • Loaders2
  • Backgrounds10
  • UI components33
  • Interface Essentials144
  • Social Icons69
  • Payment Badges41
Sign inSign in

Start free. The code for 15 components, no card needed.

Get 15 free

Inline Image Heading

This one is locked. Become a member to open the code for it and the rest of the Vault.

See plansTry the 15 free ones

What you'll need.

Install

  • gsap
  • ScrollTrigger
  • SplitText
  • CustomEase

Setup

npm i gsapregisterPlugin(ScrollTrigger, SplitText, CustomEase)

More like this

  • Reveal
  • Zoom
  • Stagger
  • Split text
  • ScrollTrigger
  • Parallax

Features.

  • Rounded photo pills sit inline between the headline's words, on the baseline at cap height
  • Each line rises out of its own mask as the headline scrolls in, one after another
  • Each pill pops in as a dot a beat after its line starts, then stretches open and pushes the words apart
  • Photos settle from a zoom as their pill opens
  • Plays in reverse when you scroll back above the start, and again on the way down
  • Photos drift up inside their pills while the headline crosses the screen, each at its own speed
  • Line breaks are measured with the pills open, so nothing re-wraps while they open
  • Rebuilds on a width change and keeps a finished reveal finished
  • Respects prefers-reduced-motion: the headline and open pills are just there
  • GSAP, ScrollTrigger, SplitText and CustomEase

How to get it right.

Use landscape photos

Each photo fills the open pill's width and is 40% taller than the pill, so the drift never shows an edge. Crops around 1.7:1 work best; keep the subject in the middle, since a pill opens from its centre.

Two or three pills

The pills are the accent. Two or three in a one-sentence headline keeps it readable; one per line or more turns the text into a gallery.

Put the pills between words

Leave a space on each side of a pill. It is split as part of the line it sits on and never on its own.

Keep it big

The headline is clamp(3em, 7vw, 6.3em). The pills are sized in em of the headline, so at body sizes they shrink to thumbnails.

Variations.

  • Default — 1.7em pills, 1.2s reveal, 8% drift
  • Wide pills — data-au-pill-width="2.2" for more photo per pill
  • Still photos — data-au-drift="0" and data-au-zoom="1"
  • Snappy — data-au-duration="0.8" and data-au-stagger="0.06"
  • Your colours — override --iih-bg, --iih-fg and --iih-pill-bg on the section; --iih-pill-h and --iih-pill-r change the pill's shape

Where it fits.

  • Studio or brand intros — one sentence that says what you do, with the work in it
  • Product pages — the ingredients, colours or materials as pills in the headline
  • Portfolio openers — three projects in one line
  • Event pages — the speakers or the venue between the words of the title

Frequently asked.

The reveal is set to play on the way in and reverse when you scroll back above the start, so it can play again. Lines drop back into their masks and the pills close to dots.

Yes. Add or remove [data-iih-pill] spans with an [data-iih-img] inside each. Pills on the same line open 0.1s apart.

It is, on purpose: the photo is the open pill's width and 40% taller than the pill, so it can drift. Pick a crop with the subject in the centre.

Set font-size on .iih_headline. The pills are in em of the headline and scale with it.

Each photo keeps its alt text. The headline is split into lines only, so screen readers read the same words and photos in the same order. Under reduced motion nothing is split or animated.

Related components.

Pro

Multi-Cursor Typing

Load

Pro

Scroll-Lit Word List

Scroll

Pro

Glitch Wipe Reveal

Scroll