Stagger

Stagger-in a container's direct children when it enters the viewport. Useful for cards, lists, grid items.

1
2
3
4
5
6

Usage

import { Stagger } from '@bwo-ui/react';

<Stagger stagger={0.08} from={{ y: 32, opacity: 0 }}>
  <Card>...</Card>
  <Card>...</Card>
  <Card>...</Card>
</Stagger>

Props

PropTypeDefaultDescription
itemSelectorstring':scope > *'Direct children selector.
from{ y?, x?, opacity?, scale?, rotate? }Initial state for each child.
durationnumber0.8Per-item duration.
staggernumber0.08Stagger between items.
easestring'power3.out'GSAP ease.
startstring'top 85%'ScrollTrigger start.
oncebooleantruePlay only once.