Add an auto-hide behaviour to the header of this website (a smart header that hides when you scroll down and comes back when you scroll up, also called a headroom header). Behaviour, two separate states: 1. Tint: once the page has scrolled more than about 40px, give the header a background, so the content scrolling underneath does not show through. Remove it again at the top. 2. Direction: when the visitor scrolls down more than a small threshold (about 10px of travel), slide the header up out of view with transform: translateY(-100%). As soon as they scroll up, slide it back in. Never hide it in the first 100px of the page or while the mobile menu is open, and show it again when an element inside it gets keyboard focus. Use a passive scroll listener with requestAnimationFrame and a 300ms ease transition. If there is a WordPress admin bar, offset the header with top: var(--wp-admin--admin-bar--height, 0px). Respect prefers-reduced-motion by removing the slide transition. Style: build it in the existing design system of this website. Reuse its colours, fonts, spacing, corner radius and existing classes or components, and don't add new colours or fonts. Use real content from this website for any text or images in the effect (its headings, services and copy), never placeholder text. If the project has no design system yet, ask me for the brand colours and fonts before you start.
Count-up numbers
Key figures count up from zero the moment they scroll into view.
This is the real effect. Scroll or move your mouse inside the frame to try it.
Add count-up numbers to [the stats I point to]: the figures count up from zero when they scroll into view (also called animated counters). Behaviour: when a number comes into view (IntersectionObserver, about 40% visible), it counts from 0 to its value in about 1.6 seconds with an ease-out (fast at first, slowing down at the end), staggered by about 150ms per number. It runs once. The number keeps its formatting while counting: prefix and suffix (like €, + or %), thousands separators and the same number of decimals as the final value. Use tabular-nums so the digits do not jump around while counting. The final number stays ordinary, editable text in the HTML. The script reads it, counts up to it and keeps the original markup, so it never shows a wrong value without JavaScript or to search engines. Screen readers get the final value (aria-label). With prefers-reduced-motion, show the final numbers immediately. Style: build it in the existing design system of this website. Reuse its colours, fonts, spacing, corner radius and existing classes or components, and don't add new colours or fonts. Use real content from this website for any text or images in the effect (its headings, services and copy), never placeholder text. If the project has no design system yet, ask me for the brand colours and fonts before you start.
What it is
Numbers that count up from zero the moment you scroll to them. A small thing, but your eye goes straight to the stat that is moving.
When it works
For the three or four numbers that prove something: projects, years, satisfied clients, money saved. Years in business, finished projects or happy clients are good figures for this. Only use it for numbers that are worth the attention.
Get it right
- Keep the real number in the HTML. The animation counts toward it, it never replaces it.
- Use tabular numbers, so the digits do not jump while counting.
- Count once. Doing it every time you scroll past gets annoying.
Also called
- Animated counters
- Number counter on scroll
- Stats counter
- Counting numbers
More effects.
All effects- InteractivePrompt
- InteractivePrompt
Add a slide-over quote panel to this website: the quote or contact form slides in from the right side, without leaving the page. Markup: one panel for the whole site, using a native <dialog> element, placed once in the footer template, holding my existing form, a heading and a close button. Any link to #quote (or with a data-quote attribute) anywhere on the site opens it. Behaviour: the panel slides in from the right (transform translateX, about 400ms with a soft ease) while the page behind dims with a backdrop. It closes with the close button, the Escape key or a click on the backdrop, and slides out the same way. Opening it moves focus to the first field, focus stays inside the panel, and closing returns focus to the button that opened it. The page behind does not scroll while it is open. After a successful submit, the form is replaced by a thank you message in the same panel. On mobile the panel takes the full width. If the page itself is a contact page, scroll to the inline form instead of opening the panel. Respect prefers-reduced-motion by fading instead of sliding. Style: build it in the existing design system of this website. Reuse its colours, fonts, spacing, corner radius and existing classes or components, and don't add new colours or fonts. Use real content from this website for any text or images in the effect (its headings, services and copy), never placeholder text. If the project has no design system yet, ask me for the brand colours and fonts before you start.
- InteractivePrompt
Turn the product images in [the cards I point to] into rotatable 3D product viewers with three.js: every card shows a 3D model you can grab and turn. Models: load the product models I give you (glTF), or build simple products from code when there are none. Give them realistic materials: an environment map for soft reflections (PMREMGenerator from a simple studio scene with a few bright panels), physical materials with the right roughness, metal where it is metal. Tech: use ONE WebGL renderer and ONE fixed canvas behind the whole page for all cards (browsers limit the number of WebGL contexts). Every frame, read the position of each card's image area with getBoundingClientRect and render that product into it with setViewport and setScissor. Skip cards that are off screen. Never resize the drawing buffer while scrolling, only on window resize. Behaviour: each product turns slowly by itself (about one turn every 25 seconds). Dragging on its card rotates it (with inertia); after letting go it eases back to its slow spin. A soft contact shadow under every product. Cap the device pixel ratio at 2. With prefers-reduced-motion, no auto spin. Style: build it in the existing design system of this website. Reuse its colours, fonts, spacing, corner radius and existing classes or components, and don't add new colours or fonts. Use real content from this website for any text or images in the effect (its headings, services and copy), never placeholder text. If the project has no design system yet, ask me for the brand colours and fonts before you start.