ScrollPremium

Scale In

Five centred 260 px blocks in a 280 px scrolling frame: each starts at 70% of its size, invisible, and swells to full size while its first half crosses the bottom edge — 43 px of scrolling for an 87 px block. animation-timeline: view(), range entry 0% → entry 50%, no JavaScript.

CSSScaleScroll

Updated

This effect is part of Effect.Labs — 846 vanilla effects, some free, some premium. Scroll has 74 effects, including 12 free. Explore the category →

3 usage examples

Seed packets in a seed library — a public library's swap catalogue — Scale In example 1

① Seed packets in a seed library — a public library's swap catalogue

WhenCatalogue page of a seed library: fifteen varieties in a three-column grid, each with the number of packets available and the sowing period. The visitor scrolls the whole page to pick what to take home.
WhyThree tiles of one row enter together, so they swell together: the grid fills in row by row with no per-column setting. Because the block grows in place, neighbouring tiles do not move and the grid stays aligned during the motion.
SettingsThe code's animation untouched (scale .7, range entry entry 50%). A 540 × 306 px area, the tray turned into a three-column grid (12 px gap), fifteen 161 × 112 px tiles: each row swells over 56 px. Light theme. In the capture the area moves on its own at 62 px/s: that is a timer in the scene, not the effect.
Session dates for a pottery course — a row to slide on a studio's listing — Scale In example 2

② Session dates for a pottery course — a row to slide on a studio's listing

WhenListing of a wheel-throwing course: under the description, twelve session dates fit in one horizontal row of chips (day, month, places left) that you slide through before booking.
WhyIn a narrow row, a chip swelling at the right edge tells you more dates lie further on, better than a scrollbar would. The swelling is short (half the chip), so the date is readable before the chip is fully in.
SettingsOne setting changes: animation-timeline: view(inline) on the chips, to follow the horizontal axis. A 350 × 104 px area with overflow-x: auto, the tray laid out as a row, twelve 70 × 86 px chips: each swells over 35 px of sliding. 615 px of travel, covered at 70 px/s by the scene's timer.
Directory of an office building — lobby kiosk, one button per floor — Scale In example 3

③ Directory of an office building — lobby kiosk, one button per floor

WhenTouch kiosk in the lobby of a building: six floor buttons on the left, one large card per floor on the right listing its occupants and door numbers. Touching a button brings that floor's card to the top of the screen.
WhyThe next floor's card peeks out at the bottom, small and pale: you can see there is more. On click it swells during the trip and arrives full-size. The smooth scrolling comes from the scroll-behavior: smooth in the sold code; the button only calls scrollTo.
SettingsThe code's animation untouched. A 478 × 310 px area, six 446 × 234 px cards (one per floor), 12 px apart: each card swells over 117 px, hence a clearly visible motion. The buttons scroll to the chosen card; in the capture a timer clicks 4, 3, 2, 1 then back to 5, every 1.25 s.

How it works

The HTML is three levels under the .fx-0536-root root: the .sdc-scroll-container area (280 px tall, overflow-y: auto), the .sb-scalein-content tray (centred flex column, 24 px between blocks, 60 px of padding top and bottom) and five 260 px .sb-scalein-box blocks holding a heading and one line. A “Scroll ↓” hint sits over the bottom of the frame. All the motion lives in one rule: opacity: 0; transform: scale(.7) as the starting state, the fx0536ScaleIn keyframe that brings it back to opacity: 1; scale(1), and animation-timeline: view(), which swaps the clock for the block's position inside the area.

The animation-range: entry entry 50% range sets how long the swelling lasts. entry begins when the block's top edge meets the bottom edge of the area and ends once the whole block is inside; stopping at 50% means the block is full-size and opaque while half of it still sticks out. Measured on the demo: on load blocks 1 and 2 are in place and the 3rd waits just below the frame; after 40 px of scrolling it sits at 87% opacity and scale .96, and at 44 px it is done. The block grows from its centre (default transform-origin) and never pushes its neighbours, since transform leaves layout alone.

Nothing is played once and for all: progress is a function of position. Scrolling back up shrinks the block as it leaves through the bottom, scrolling down swells it again, and a block that left through the top stays full (animation-fill-mode: both). The rule is wrapped in @supports (animation-timeline: view()): a browser that does not know the property never receives the starting state and shows five ordinary blocks. Every selector is written under the root and the @keyframes carry the effect's number, so two copies on one page each scroll on their own (measured: the 2nd at 371 px, the 1st still at 0).

Accessibility

  • Reduced motion: under prefers-reduced-motion: reduce the block no longer changes size. The code swaps the keyframe for fx0536Fade and sets transform: none, leaving a scroll-linked fade (measured: block 4 at 16% opacity, no transform, at 120 px). The hint stops pulsing and keyboard scrolling is no longer smoothed.
  • Keyboard: the area carries tabindex="0", role="region" and an aria-label. Tab stops on it in Chromium, Firefox and WebKit, with a 2 px violet outline; the arrow keys then scroll it (4 presses: 160 px in Chromium, 204 px in Firefox). Without that tabindex, WebKit skipped the area. Rewrite the aria-label to match your content.
  • Touch: nothing special to plan for, this is native scrolling. A 150 px finger drag scrolls the area by the same amount (measured with Chromium touch emulation, 390 px wide) and the blocks swell under the finger. At either end the gesture is handed to the page, which is how a nested scroller normally behaves.
  • Reading: a block at opacity: 0 stays in the accessibility tree, so a screen reader reads all five blocks without waiting for the scroll. The headings are h4: match their level to your page. The secondary text (white at 50% over the block background) sits at roughly 5.3:1; the hint, hidden from screen readers, swings between 50% and 85% opacity and stays readable at its low point.

Browser compatibility

CSS only. The swelling needs animation-timeline: view() and animation-range: Chrome and Edge 115, Safari 26, Firefox 159 according to MDN data. Measured here in Chromium 149 and WebKit 26.5 (same values to the pixel: block 4 at .16 opacity and .75 scale at 120 px). In Firefox 151, @supports answers no: the five blocks are shown at full size with no animation and the area scrolls normally. Firefox 159 and later were not tried.

Chrome 115+✓ Full (measured in Chromium 149)
Edge 115+✓ Not verified (same engine as Chrome)
Safari 26+✓ Full in the WebKit 26.5 test build; real Safari not verified
Firefox 159+✓ Not verified (support announced by MDN)
Firefox up to 158✓ Static blocks, all visible (measured in Firefox 151)
iOS 26+ / Android Chrome 115+✓ Not verified on a device (finger scrolling measured in emulation)

The fallback is already in the code: without animation-timeline, the rule under @supports is dropped as a whole, so neither the .7 scale nor the zero opacity applies. No block can stay hidden. Nothing to add, unless you insist on an animation in old browsers — that would take an IntersectionObserver, which this code does not include.

The code

HTML structure to paste into your page (the CSS + JS come with your purchase):

index.html — structure
<div class="fx-0536-root">
  <div class="sdc-scroll-container" tabindex="0" role="region" aria-label="…">
    <div class="sb-scalein-content">
      <div class="sb-scalein-box">
        <h4>…</h4>
        <p>…</p>
      </div>
      … ×5
    </div>
  </div>
  <span class="sdc-scroll-hint" aria-hidden="true">…</span>
</div>

One-time payment, no subscription — the code is yours forever

Customize

Options passed to the API or data-* attributes:

Option / propertyDefaultEffect
Starting size (CSS — transform: scale(.7) under @supports) .7 .9 gives a barely noticeable swell, for a dense list; .4 makes the block burst in. The keyframe always ends at scale(1): change the starting state only.
Range (CSS — animation-range: entry entry 50%) entry 0% → entry 50% (43 px for an 87 px block) The length depends on the block's height: 117 px for a 234 px card. entry 0% entry 100% only finishes once the block is fully in; beyond that (cover) you get the behaviour of View Timeline Scale.
Anchor point (CSS — to add: transform-origin) centre of the block transform-origin: 50% 100% grows the block from its bottom edge, 0 50% from the left. Handy when blocks are aligned to an edge rather than centred.
Axis (CSS — animation-timeline: view()) vertical view(inline) follows horizontal scrolling (a row of chips, a carousel): also switch the area to overflow-x: auto and the tray to a row. view(block 40px) pulls the edges in by 40 px: the swell only starts once the block has risen 40 px into the area.
Scrolling area (CSS — .sdc-scroll-container { height: 280px }) 280 px, tray as tall as its content Remove height and overflow-y: view() then latches onto the page scroll. Keep at least one block below the bottom edge, otherwise nothing has a reason to swell.
Block width (CSS — .sb-scalein-box { width: 260px }) 260 px, centred width: auto with align-items: stretch on the tray for full-width blocks; or a grid on the tray, each cell swelling on its own account.
Hint (HTML — span.sdc-scroll-hint) “Scroll ↓”, 2 s pulse It is a demo marker laid over the bottom of the frame: delete the span in production, or translate it.

FAQ

By one line, but it changes the look. Here the range stops halfway through the entry: the block is full 43 px after it appears, so almost the whole frame shows blocks at their size. View Timeline Scale stretches the same swell up to the middle of the frame (183 px): the lower half is always filled with blocks that are still small. Pick Scale In for a list people read, the other one to highlight whatever passes through the centre. As for Scale on Scroll (fx-0558), it plays exactly the same animation as this one, same start and same range: only its template differs, three icon cards instead of five text blocks.
That is what the entry entry 50% range does: the swell takes up the first half of the entry. The benefit is practical — the block's heading is readable at its size before the block is fully in, and a block stopped across the bottom edge does not look broken. If you would rather have it finish exactly when it is in, write animation-range: entry.
Not with this code. Each block tracks its own position: two blocks at the same height share the same progress and swell together (that is what the seed library grid does). An offset would take a different range per column, for example :nth-child(3n+2) { animation-range: entry 10% entry 60% } — animation-delay does not count in pixels on a scroll timeline.