Timeline
A vertical timeline: the connector draws down on scroll, nodes pop in, the current step pulses. Layout.
Open playground- Order placed9:02
We received your order.
- Packed11:40
Wrapped and labelled.
- Out for deliveryNow
Arriving this afternoon.
- Delivered
Leave it with a neighbour if you are out.
About
Timeline is a React component in the Layout category of smoui. It is typed, ships no stylesheet, follows your theme through CSS variables, and honors prefers-reduced-motion. Import it with import { Timeline } from "@ashutoshswamy/smoui" and set items, current.
Install
npm i @ashutoshswamy/smouiUsage
import { Timeline } from "@ashutoshswamy/smoui";
<Timeline current={2} items={[{ title: "Order placed", time: "9:02" }, { title: "Packed" }, { title: "Out for delivery" }]} />Props 2
- items
Steps.
{ title: string; time?: string; description?: string; icon?: ReactNode }[]- current
Index in progress. Earlier steps are filled; defaults to all done.
number
More layout components
- AccordionStacked disclosures. The plus turns to a cross and the answer unfolds on a spring.
- BentoGridMixed-size tiles that rise in as a stagger, lift on hover, with a light that trails the cursor.
- CarouselDrag or flick: slides coast then snap to centre on a spring while the neighbours shrink and dim.
- EmptyStateWhat to show when there is nothing yet. Cards fan out behind an icon, the text rises in and hovering spreads the cards.
- MasonryTiles of different heights packed into the shortest column, every column ending on the same line. They rise in one after another and glide to their new place when the column count changes.
- ReorderListA list you reorder by its grip. Neighbours slide aside on a spring, and the keyboard works too: focus the grip, press arrow up or down. Moves are announced.