<sibling-index>
Newly availableSince 202686% of users
Returns the element's position among its siblings, counting from 1. Use it for staggered animations or styles that change along a list, without an nth-child() rule for each item.
What's modern
From web-features, MDN's browser data and our snippets, checked dailyModernIn every major browser since August 2026. Widely available around February 2029.
The old way and the modern waySee the snippet: Staggered animations without nth-child hacks →
Old way 17 lines
/* Manual index per nth-child */
li:nth-child(1) {
--i: 0;
}
li:nth-child(2) {
--i: 1;
}
li:nth-child(3) {
--i: 2;
}
li:nth-child(4) {
--i: 3;
}
/* … repeat for every item … */
li {
transition-delay: calc(0.1s * var(--i));
}Modern 4 lines
li {
transition: opacity .25s ease, translate .25s ease;
transition-delay: calc(0.1s * (sibling-index() - 1));
}See how modern your own CSS is.Check your CSS →
Quick example
.list-item {
/* Staggers the animation delay based on the item's position */
animation-delay: calc(sibling-index() * 100ms);
}Related snippet
Staggered animations without nth-child hacksAnimation →<sibling-index> browser support
BaselineNewly availableSince 2026 this feature works across the latest devices and browser versions. This feature might not work in older devices or browsers.Works in all modern browsers. May need a fallback for older browsers.
Usage86%of people can use this14% use a browser without it.
Browsers
138+
154+
26.2+
138+Mobile
138+Android
154+Android
26.2+iOS