Keyframery

Animated Waterfall for UI SDK

Request bars grow from their start time one row after another, and nested spans cascade in.

Part of Keyframery, the open-source animated components for UI SDK

The demo plays by itself. Point at it or press Tab to take over.

Installation

npx shadcn@latest add @keyframery/waterfall

This adds components/keyframery/waterfall.tsx and its primitive, components/keyframery/primitives/waterfall.tsx, to your project, and installs @ui-sdk/react. The motion tokens are added to your global CSS the first time you install a component.

Usage

import {
  Waterfall,
  WaterfallAxis,
  WaterfallBar,
  WaterfallCell,
  WaterfallColumnHeader,
  WaterfallHeaderRow,
  WaterfallIndicator,
  WaterfallMark,
  WaterfallRow,
  WaterfallRowHeader,
  WaterfallTick,
} from "@/components/keyframery/waterfall"

The parts and props are the same as UI SDK's Waterfall. For every prop, see the UI SDK waterfall reference.

What moves

MoveWhat you see
CascadeRows arrive one after another; opening a span cascades its children.
SpringBars grow from their start time, and glide when timings change.
SpringThe chevron turns on a spring.

Timing and springiness follow the motion style you set, so this component moves like the rest of your app.

Swap the import

Already using UI SDK's waterfall with your own styles? Keep your markup and change one line. The primitive adds motion and nothing else.

// Before
import { … } from "@ui-sdk/react/waterfall"

// After: same parts, same props, now animated
import { … } from "@/components/keyframery/primitives/waterfall"

Parts

The finished component exports 11 parts:

Waterfall, WaterfallAxis, WaterfallBar, WaterfallCell, WaterfallColumnHeader, WaterfallHeaderRow, WaterfallIndicator, WaterfallMark, WaterfallRow, WaterfallRowHeader, WaterfallTick

Accessibility

Keyboard, focus and screen-reader behaviour come from UI SDK and are not changed. With reduced motion turned on, nothing in the waterfall moves: changes happen at once or with a short fade. More in Accessibility.

Source

The code that lands in your project. It is yours to change.

Questions

How does the animated Waterfall for UI SDK move?

Cascade: Rows arrive one after another; opening a span cascades its children. Spring: Bars grow from their start time, and glide when timings change. Spring: The chevron turns on a spring.

Do I need Motion or Framer Motion for the animated Waterfall?

No. Every move is plain CSS, so there is nothing to install besides the component and UI SDK.

Can I keep my own styling and only take the motion?

Yes. Import from @/components/keyframery/primitives/waterfall instead. It has the same parts and props as @ui-sdk/react/waterfall and adds motion only.

What happens to the Waterfall when someone turns on reduced motion?

Nothing moves. State changes happen at once, or with a short fade.

On this page