Skip to content

Staggered reveal without a delay variable

A grid of cards that rise in one after another thanks to sibling-index() and sibling-count(), with no --i in the HTML, a Firefox fallback and reduced motion respected.

  • Tailwind
  • React
  • CSS
  • WordPress
Open in a new tab

Description

On load, the service cards rise in one after another. Each card's delay is computed by the browser with sibling-index(): the HTML holds no style="--i: 3", and a card added later (by hand, by a CMS or by a loop) takes its place in the cascade on its own. sibling-count() shortens the step as the list grows, so the whole cascade never lasts longer than --eaes-total (720 ms by default): 90 ms between two cards for six cards, 45 ms for sixteen. Support: Chrome and Edge 138+, Safari 26.2+; Firefox, which does not know these functions yet, gets fixed :nth-child delays on the first twelve cards, later ones sharing the last delay. Only opacity and translation are animated, with no layout shift. With prefers-reduced-motion and when printing, the cards are shown in place at once; cards stay real list items with their h3 heading, read normally by screen readers, and AA contrast holds in light and dark mode. Settings through variables: --eaes-step (maximum step), --eaes-total (maximum cascade length), --eaes-duration (length of one card). Fluid grid with no overflow at 360 px. Example: an accounting firm in Lyon.

Code

Loading the code…

The code of this component in

Archive contents

effet-apparition-echelonnee-sibling-index-html-tailwind.zip3 files · 5 Ko

  • index.html8 Ko
  • README.md4 Ko
  • LICENSE.md1 Ko

Tags

Updated on December 4, 2026.

Reviews

No reviews yet.

In the same spirit

  • Cards that fade in as they enter the screen, one after another in each row, without a line of JavaScript and with a static fallback.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component
  • A translucent card with a saturated blur whose sharper edge refracts the colourful shapes drifting behind it, with an opaque fallback when transparency is reduced.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component
  • A help block shaped like a conversation: bubbles, three animated typing dots and clickable quick replies that show your answers to frequent questions, frozen under prefers-reduced-motion.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component