Animations

Set animateRows to enable two animations: a staggered entrance for rows on mount, and a smooth transition when rows reorder after a sort.

Row animations

Toggle animateRows on/off and use Replay to re-trigger the entrance animation. Click a column header to see the sort-reorder animation.

Animations on — sort to see reorder animation
Name
Department
Salary
Aria Chen
Engineering
$155,000
Marcus Webb
Product
$132,000
Priya Kapoor
Design
$118,000
Jordan Ellis
Analytics
$143,000
Sam Rivera
Engineering
$128,000
Taylor Brooks
Sales
$97,000

What animates

EventAnimation
Initial mountRows fade and slide up with a staggered delay (0–200 ms)
Sort changeRows transition smoothly to their new positions
Expand toggleExpander row fades in/out

Accessibility: reduced motion

All animations respect prefers-reduced-motion. When the user has requested reduced motion in their OS settings, animations are disabled automatically via a CSS media query. No JavaScript check required.

/* DataTable.css (simplified) */
@media (prefers-reduced-motion: reduce) {
  .rdt_TableRow,
  .rdt_ExpanderRow {
    animation: none !important;
    transition: none !important;
  }
}

Combining with other features

animateRows works with pagination, server-side data, selection, and expandable rows. Row animations fire whenever the data prop changes, so they also trigger after a server-side page change.

Custom animation timing

The stagger delay and duration are controlled by CSS custom properties. Override them per-theme or globally:

/* your app's CSS */
.rdt_Table {
  --rdt-row-anim-duration: 300ms;
  --rdt-row-anim-stagger:  20ms;
}