We Boost LeadsBatch 4 · 20 modules

WBL Code Library

20 copy-ready modules for preview sites: half make the page flow smoothly, half show off the business in the first phone screen. Each one is a folder with a live demo, its own JS and CSS, and a README.

01Flow1.6 KB

Smooth scroll (Lenis)

Lenis smooth wheel scrolling for desktop only, with defaults that keep phones native: no touch hijack, anchors with header offset, paused under modals, instant jumps for keyboard focus.

Lenis 1.3.26 · MIT · 5.5 KB

Open demoREADME
02Flow1.7 KB

View transitions

Native page and section transitions: a card's photo morphs into the next page's hero (and back), and same-page switches cross-fade with a shared-photo morph. No library.

No dependency

Open demoREADME
03Flow1.5 KB

Scroll scenes (CSS scroll-driven)

Reading progress bar, image parallax bands and soft fade-ups, driven by native CSS scroll timelines (off the main thread), with a tiny JS fallback for older browsers.

No dependency

Open demoREADME
04Flow1.6 KB

Reveal that never leaves blanks

Staggered scroll reveals with guarantees: nothing on screen at load is ever hidden, stagger is capped at 5 × 60 ms, and anything you flick past, jump to or print is simply there.

No dependency

Open demoREADME
05Flow1.1 KB

Blur-up image loading

A tiny blurred version of each photo (a 20 px JPEG, ~0.7 KB inlined) sits in a box of the right shape until the real photo has decoded, then the photo fades in. No grey boxes, no pop, no layout shift.

No dependency

Open demoREADME
06Flow0.7 KB

Font swap without layout shift

Web fonts that arrive without moving a single line: a local font resized to the web font's exact footprint shows first, then swaps invisibly. With an overlay proof and an in-browser calculator for new fonts.

No dependency

Open demoREADME
07Flow1.9 KB

Sticky book bar

The phone's bottom bar (Call + "From $40 · Book a visit"): there from the first screen, slides away while reading down, back on any scroll up, a pause, the page end or keyboard focus; steps aside for the form and the keyboard.

No dependency

Open demoREADME
08Flow2.0 KB

Smooth FAQ accordion

Native <details> FAQ that glides open and shut: pure CSS where the browser can animate to height:auto, a 1 KB Web Animations fallback elsewhere, one-open-at-a-time groups, and FAQPage schema from the page.

No dependency

Open demoREADME
10Showcase3.1 KB

Business card strip

Rating with count, a live Open now · closes 7 pm, and the street with Get directions, packed under the hero headline so the first phone screen answers "good? open? where?".

No dependency

Open demoREADME
11Showcase3.8 KB

Walk-in card

A bold live status tile from real hours: Walk-ins welcome now · last walk-in 6:30 pm, flipping to "book ahead" near closing and to the next opening when closed.

No dependency

Open demoREADME
12Showcase2.9 KB

Service picker

Fresha-style menu rows with duration, price and a (+). A running "Your visit" total, and on phones a sticky From $X · Book bar that becomes "2 services · 1 h 45 min · $110".

No dependency

Open demoREADME
13Showcase2.0 KB

Photo review cards

Reviews as photo + quote cards on a native swipe track: the next card peeks, buttons and a "2 / 6" counter on the side, the rating with count on top. Never autoplays.

No dependency

Open demoREADME
14Showcase2.3 KB

Before / after slider

Drag anywhere on the photo (or use the arrow keys) to wipe between before and after. Built on a real range input, so keyboards and screen readers get it for free.

No dependency

Open demoREADME
15Showcase1.1 KB

Team cards

"Ask for Maria" staff cards: portrait under one shared brand tint (so mismatched phone photos read as a set), role, a one-line quote from a real review, and Book with Maria.

No dependency

Open demoREADME
17Showcase0.8 KB

Rating line under the CTA

"★★★★★ 4.9 · 212 Google reviews" as one quiet linked line right under the hero button, with stars that fill exactly (4.7 = 94%). CSS only.

No dependency

Open demoREADME
18Showcase4.2 KB

Visit block

The last screen done right: Apple-style hours with today in bold and a live status, holiday closures, the address with a landmark, Get directions, Copy address, and a map that loads only when tapped.

No dependency

Open demoREADME
19Showcase2.2 KB

Gift card picker

A mock of the shop's own branded gift card that updates as you pick $25 / $50 / $100 / Other, add a name and choose text or email. The button says "Buy a $50 gift card".

No dependency

Open demoREADME
20Showcase1.3 KB

Trust strip

Licensed (with the number linking to the state lookup), insured, years in business that update themselves, and the rating: four facts on hairlines, not icon cards.

No dependency

Open demoREADME

Dropping a module into a site

  1. Copy modules/<name>/ to the site as /wbl/<name>/.
  2. Paste the copied snippet: the head lines (one wbl-js line per page, shared by every module) and the markup.
  3. Bridge the colours once: :root{--wbl-accent:var(--a);--wbl-ink:var(--ink);--wbl-paper:var(--bg)}.

Every demo uses sample data for a fictional salon ("Juniper Hair Studio") and Pexels placeholder photos. On a client site, use only their real hours, prices, reviews and photos.

Earlier libraries: batch 1 (15 vanilla effects) · batch 2 (GSAP) · batch 3 (the GSAP shelf).