Turn [the gallery or cards I point to] into a bleed slider: it starts in line with the page content on the left, but runs off the right edge of the screen. Layout: the left edge of the first slide lines up with my normal content container. The track runs to the right edge of the viewport, so the next slide is visibly cut off there, which tells people there is more. Images keep a fixed aspect ratio. Tech: a native horizontal scroll container with scroll-snap (snap-align start) and a hidden scrollbar. Set padding-inline-start (and scroll-padding-inline-start) to the same value as the container's left edge, for example max(5vw, (100vw - container width) / 2), so the first slide lines up and every snap lands on that line. Add mouse dragging for desktop (pointer events, with a small inertia) and two arrow buttons that scroll by one slide and disable at the ends. Accessibility: the slides are a list, arrows are real buttons with labels, it scrolls with the keyboard and with touch natively. Respect prefers-reduced-motion by using instant scrolling for the arrows. 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.
Snap carousel with arrows
A row of cards that scrolls natively and snaps into place, with arrows that know when you reach the end.
This is the real effect. Scroll or move your mouse inside the frame to try it.
Turn [the cards I point to] into a snap carousel with arrows: a row that scrolls natively and snaps into place, with arrow buttons for desktop. Tech: no slider library. The track is a horizontal scroll container with scroll-snap-type: x mandatory, each card has scroll-snap-align: start, and the scrollbar is hidden. On mobile, let the next card peek in so people know they can swipe. Touch and trackpad scrolling just work. Arrows: two buttons next to the heading. One click scrolls by exactly one card width plus the gap, with smooth scrolling. The arrows are disabled at the start and the end (check the scroll position on scroll and on resize; settle the state on scrollend where supported, with a fallback for browsers without it). Optional: small dots under the track that show the current position. Accessibility: the cards are a list, the track can be focused and scrolled with the arrow keys, the buttons have labels and a visible disabled state. Respect prefers-reduced-motion by scrolling instantly. 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
A row of cards you can swipe through, that always snaps neatly into place. On desktop two arrows do the same, and they grey out when you reach the end.
When it works
Blog posts, products, reviews, anything where a row is better than a long list. The blog carousel on Living with Prompts works like this. It is the most boring effect in this library, and also the one you will use most.
Get it right
- Use native scroll snap. A slider library adds weight and breaks touch scrolling.
- Let the next card peek in on mobile, so people know they can swipe.
- Disable the arrows at the ends.
Also called
- Scroll snap slider
- Native carousel
- Card slider with arrows
- CSS scroll snap carousel
More effects.
All effects- LayoutPrompt
- LayoutPrompt
Add a floating effect to [the product image I point to]: the product hovers above its own shadow, sways a little and leans toward the mouse. Markup: the product as a cut-out with a transparent background (PNG or WebP, or a 3D model if I have one), in a fixed frame, with a separate soft shadow element below it (an ellipse with a blurred radial gradient, not a box-shadow). Behaviour: the product bobs up and down slowly (about 6 seconds per cycle, ease-in-out, a movement of about 12px) with a very small rotation. The shadow moves in sync: when the product goes up, the shadow gets smaller and lighter, when it comes down, the shadow grows and darkens. On top of that, the product tilts a few degrees toward the mouse with a 3D perspective (rotateX and rotateY, eased with requestAnimationFrame), only while the pointer is over the section. Keep the image editable in my CMS and give it a fixed aspect ratio, so a replacement image never changes the layout. Respect prefers-reduced-motion: the product stands still on its shadow. 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.
- 3D and motionPrompt
Add a text scramble reveal to [the heading I point to] (letters churn through random characters and lock into place one by one, like a word being decoded). Behaviour: when the heading comes into view, every letter starts as a random character. From left to right, each slot keeps changing to another random character a few times, then locks to its real letter with a small stagger (about 40 to 60ms per letter, the whole heading in under a second and a half). Use random characters of roughly the same width as the final letter, so the text does not jump around or change its number of lines while it decodes. While decoding, the unlocked characters are shown at lower opacity, locked ones at full opacity. When everything is locked, a text cursor blinks twice at the end and disappears. Tech: plain JavaScript and requestAnimationFrame, no library. Keep the real text in the HTML and set aria-label, so screen readers and search engines read the final words, not the noise. Reserve the width so nothing shifts. Run it once per page view. With prefers-reduced-motion, show the final text 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.