Hulian UIv0.93.5413 components0 components
  • Start
  • Components
  • Blocks
  • Pages
  • Demos
  • Changelog
ChineseEnglish
  • ComponentsComponents
  • ThemeTheme

Collections

  • QuestionCard
  • Table
  • Book3D
  • ProTable
  • PricingTable
  • JsonViewer
  • EditableTable
  • List
  • Descriptions
  • RowActions
  • Tree
  • Card
  • Carousel
  • Video
  • Audio
  • BentoGrid
  • Image
  • MagicCard
  • AnimatedList
  • Marquee
  • Sortable
  • Kanban
  • DesignCanvas
  • LayerTree
  • StageDraw
  • SlideDeck
  • PresenterView
  • ComponentPicker
  • EventStream
  • QueueLane
  • DocumentSheet
  • Novel reader
  • Scheduler
  • Org classroom
  • Danmaku
  • LiveChat
  • LivePlayer
  • LogViewer
  • FileTree
  • CodeReviewThread
  • VirtualList
  • InfiniteScroll
  • LogoLoop
  • BounceCards
  • CardSwap
  • ChromaGrid
  • CircularGallery
  • DomeGallery
  • FlyingPosters
  • InfiniteMenu
  • MagicBento
  • ScrollStack
  • ProfileCard
  • TiltedCard
  • PixelCard
  • DecayCard
  • ReflectiveCard
  • Folder

Charts and Diagrams

  • Flow
  • Diagram
  • Paper
  • SequenceDiagram
  • Sankey
  • Sparkline
  • Funnel
  • Treemap
  • Gantt
  • Heatmap
  • ContributionGraph
  • Legend
  • Chart
  • WorldMap

Information

  • ImageViewer
  • LiveProductCard
  • DiffStat
  • ScoreRing
  • ScoreScale
  • Badge
  • Dot
  • StatusDot
  • Chip
  • FilterChip
  • Coupon
  • Tag
  • Annotation
  • Avatar
  • AvatarCircles
  • User
  • QRCode
  • Comment
  • RelativeTime
  • GitCommit
  • DeployStatus
  • ShieldBadge
  • AwardBadge
  • CreditCard
  • IconTile

Metrics

  • Stat
  • Statistic
  • Meter
  • Timeline
  • NumberTicker

Placeholders

  • Empty
  • Skeleton
  • Watermark

Timeline

timeline

Orders events along a timeline with colored or custom markers, alternate placement, and a pending state.

Usage

Basic usage

items array driver, each item label is used as the timestamp, children is used as the text, and color controls the dot tone.

  1. Employee submits reimbursement application
    09:12
  2. Approved by the direct manager
    10:40
  3. Financial review returned (missing invoice)
    14:05
  4. Employee supplements materials and resubmits
    16:20
tsx
<Timeline
  items={[
    { label: "09:12", children: "Employee submits reimbursement application", color: "primary" },
    { label: "10:40", children: "Approved by the direct manager", color: "success" },
    { label: "14:05", children: "Financial review returned (missing invoice)", color: "danger" },
    { label: "16:20", children: "Employee supplements materials and resubmits", color: "warning" },
  ]}
/>

In progress (pending)

pending Append the ongoing ghost item at the end (loading dot + dotted line connected).

  1. The package has been collected · Hangzhou Transshipment Center
    06-01 08:00
  2. In transit · Sent to Shanghai
    06-01 22:30
  3. Arrived at Shanghai Pudong delivery point
    06-02 09:15
  4. In transit · Estimated delivery tomorrow
tsx
<Timeline items={logistics} pending="In transit·Estimated delivery tomorrow" />

Custom node

The compound usage is directly transferred to <TimelineItem>, dot can be replaced by an icon (use currentColor to color with color).

  1. Account registration completed
    Step 1
  2. Real-name authentication passed
    Step 2
  3. Binding payment account (in progress)
    Step 3
tsx
<Timeline>
  <TimelineItem label="Step 1" color="success" dot={CheckIcon}>Account registration completed</TimelineItem>
  <TimelineItem label="Step 2" color="success" dot={CheckIcon}>Real-name authentication passed</TimelineItem>
  <TimelineItem label="Step 3" color="primary">Bind the collection account (in progress)</TimelineItem>
</Timeline>

Layout direction

mode Control node location: left (default) / right mirror / alternate left and right.

  1. The package has been collected · Hangzhou Transshipment Center
    06-01 08:00
  2. In transit · Sent to Shanghai
    06-01 22:30
  3. Arrived at Shanghai Pudong delivery point
    06-02 09:15
  1. Employee submits reimbursement application
    09:12
  2. Approved by the direct manager
    10:40
  3. Financial review returned (missing invoice)
    14:05
  4. Employee supplements materials and resubmits
    16:20
tsx
<>
  <Timeline items={logistics} mode="right" />
  <Timeline items={approval} mode="alternate" />
</>

When to use

Use Timeline for chronological approvals, shipment tracking, or activity history. Use GitCommit for one commit reference or Steps for a user-progressed sequence.

Import

ts
import { Timeline, TimelineItem } from "@hulianui/ui"

Props

Timeline

NameTypeDefaultDescription
itemsTimelineItemProps[]-Data-driven items equivalent to <TimelineItem {...item} />; exclusive with children.
mode"left" | "right" | "alternate""left"Left nodes, mirrored right nodes, or alternating content around a center line.
…HTMLAttributesOmit<HTMLAttributes<HTMLOListElement>, "children">-Forwarded ordered-list attributes.

TimelineItem

NameTypeDefaultDescription
color"default" | "primary" | "success" | "danger" | "warning""default"Default dot tone; ignored with a custom dot.
pendingbooleanfalseShows a spinning pending ring and makes the incoming connector dashed.
classNamestring-Custom class name.

Slots

Timeline

SlotTypeDescription
childrenReactNodeCompound TimelineItem children; exclusive with items.
pendingboolean | ReactNodeAppends a pending ghost item; true shows only the spinner, or supply content.

TimelineItem

SlotTypeDescription
childrenReactNodePrimary event content.
dotReactNodeCustom node such as an icon, replacing the colored dot.
labelReactNodeMuted timestamp or metadata below the main content.

Pitfalls

  • Choose items or children, not both.
  • label is secondary metadata below the body; do not place primary content there.
  • A custom dot replaces the default dot and makes color ineffective.

Related

Stat · Statistic · Chart · Meter · NumberTicker · WorldMap

Playground

  1. Employee submits reimbursement application
    09:12
  2. Approved by the direct manager
    10:40
  3. Financial review returned (missing invoice)
    14:05
  4. Employee supplements materials and resubmits
    16:20
<Timeline items={items} />
PreviousMeterData DisplayNextNumberTicker

On this page

  • Usage
  • Documentation
    • When to use
    • Import
    • Props
    • Slots
    • Pitfalls
    • Related
  • Playground