Scroll Highlight
Text that waits dimmed and lights up as you scroll: line by line, letter by letter, wiped open one line at a time, or word by word out of solid boxes. Scrolling back dims it again. Text that is already on screen when the page loads shows the part its position has reached, and plays up to it.
Scroll Highlight is a Free widget: it works as soon as the companion plugin is installed.
Requires: GSAP core, ScrollTrigger. The plugin loads them only on pages that use the effect; see How GSAP gets loaded.
Where to find it#
| How | Where | |
|---|---|---|
| As an element | Elements panel › Bricksify › Scroll Highlight. A text element (text with dynamic data, HTML tag, link) with an Animation group. | |
| As a control group | Scroll Highlight (Bricksify) on Heading, Basic Text, Rich Text, Text Link and Button. Pick an effect in Animation type and the other settings appear. | |
| Pinned length (% of screen height) | Word boxes only. Default 400; 0 = not pinned. | The text stays in the middle of the screen while you scroll this far, and the words appear over that stretch. Not pinned, the words appear while the text scrolls past, between the two points below. |
| Starts when text top is at / Ends when text bottom is at (%) | Word boxes when not pinned. Default 85 / 35. | Where the reveal starts and ends. |
| Words in motion at once | Word boxes only. Default 15. | Fewer gives one word after the other, more a softer wave. |
| Box colour / Box corner radius | Word boxes only. Default: the text colour / 16px. | The look of the box each word shows as before it appears. |
| Accent words / Accent colour | Word boxes only. Comma separated list / default blue. | These words, and their boxes, take the accent colour. |
Both use the same settings, saved under the same names. See How widgets work for the difference between the two.
Settings#
| Setting | Options and default | What it does |
|---|---|---|
| Effect (element) or Animation type (control group) | Line highlight, Letter fill, Line wipe, Word boxes, No animation. On the element the default is Line highlight; in the control group it is None, which leaves the effect off. | How the text is highlighted. See the table below. |
| Wipe direction | Line wipe only. Left to right (default), Right to left, Bottom to top, Top to bottom. | The way each line is uncovered. |
| Dimmed opacity | Default 0.2 (Line wipe: 0.35), from 0 to 1. | How visible the text is before it is highlighted. 0 hides it until then; 1 means no dimming. |
| Screen point (%) | Line highlight and Line wipe. Default 50. | Measured from the top of the screen. A line lights up when its top reaches it; a line is wiped when its bottom reaches it. |
| Starts when text top is at (%) | Letter fill only. Default 40. | Where the text top must be, from the top of the screen, for the first letter to start. |
| Ends when text bottom is at (%) | Letter fill only. Default 50. | Where the text bottom must be for the last letter to finish. |
| Fade per line (s) | Line highlight only. Default 0.6. | How long a line takes to light up (and to dim again). |
| Smoothing (s) | Letter fill and Line wipe. Default 1 (Line wipe: 3). | How long the text takes to catch up with the scroll. 0 locks it to the scrollbar. |
| Catch-up on load (s) | Default 1.5. | Text already on screen when the page loads plays up to where its position puts it, in about this time, lines (or letters) one after the other. 0 shows it there straight away. |
Every setting can be set per breakpoint, like any other Bricks setting: switch the builder to a breakpoint and change it there. For example, Letter fill on phones, or No animation on phones only.
The effects#
| Effect | What you see |
|---|---|
| Line highlight | The text waits dimmed. Each line fades up to full strength as its top reaches the screen point, and fades back when you scroll above it again. |
| Letter fill | The letters fill in one after the other, locked to the scroll, from the moment the text top reaches the start point until its bottom reaches the end point. |
| Line wipe | Each line is uncovered in one sweep as its bottom passes the screen point, from the side or from the bottom you choose. A horizontal wipe crosses the full width of the text block, as in the original. |
| Word boxes | The words are hidden. In reading order, each word first shows as a solid rounded box, then the box fades out as the word appears. By default the text stays pinned in the middle of the screen for four screen heights while this happens. |
How it behaves#
- It follows the scroll in both directions: highlighted going down, dimmed again going back up.
- Text already on screen when the page loads plays up to where its position puts it, in about Catch-up on load seconds; the rest waits for you to scroll. If the page loads further down with the text above, it is already highlighted when you scroll back to it.
- Lines are worked out from where the words actually wrap, and again after every resize or font load, so it stays right on every screen size.
- Only text is split, so links, bold and italic text, line breaks and icons stay in place. Words never break between their letters. Screen readers read the text once, normally.
- The dimmed part is see-through, not a cover in the background colour, so it works on images, gradients and dark panels with nothing to match.
- Do not put it on the same element as Text Roll, Fold Roll, Letter Drop or Blur Reveal: they split the same text, so Scroll Highlight steps aside.
- The effect never runs in the builder, so the text stays editable in place. Check it on the front end.
- Text added to the page after it loads (AJAX, popups, query loop pagination) can be picked up by calling
BricksifyScrollHighlight.refresh().
Reduced motion and without JavaScript#
For a visitor who has asked for reduced motion, the text is simply there, at full strength.
Without JavaScript the text shows normally. While the script loads, the text is hidden so it cannot flash at full strength and then dim; if the script or GSAP never arrives, it is shown after 3 seconds anyway.