Timeline

daisyUI 5 的 timeline 類別包裝,時序列表。items 陣列傳遞即可。orientation (vertical/horizontal)、compact (偏向一側)、snap (圖示貼上端)、appearance (solid 預設 / soft) 4 個修飾符。各項附加 state=done|current|upcoming 時中點圖示與連接線變色。預設 solid (濃主色) 使完成鏈明顯。穩和時只加選 appearance="soft"。

透過 items 陣列傳入 (vertical 為預設)

  • 10/01 09:12
    Order received
    Thank you for your order


  • 10/01 10:30
    Payment confirmed
    Paid by credit card


  • 10/02 14:00
    Preparing shipment
    Packing at the warehouse


  • 10/03 16:45
    Delivered
    Left with the recipient
<x-timeline :items="[
    ['title' => 'Order received',     'time' => '10/01 09:12', 'desc' => 'Thank you for your order'],
    ['title' => 'Payment confirmed',  'time' => '10/01 10:30', 'desc' => 'Paid by credit card'],
    ['title' => 'Preparing shipment', 'time' => '10/02 14:00', 'desc' => 'Packing at the warehouse'],
    ['title' => 'Delivered',          'time' => '10/03 16:45', 'desc' => 'Left with the recipient'],
]" />
載入中…
無法載入 HTML

orientation=horizontal — 橫向排列的 4 個步驟

  • Step 1
    Cart


  • Step 2
    Shipping


  • Step 3
    Payment


  • Step 4
    Done
<x-timeline orientation="horizontal" :items="[
    ['title' => 'Cart',     'time' => 'Step 1'],
    ['title' => 'Shipping', 'time' => 'Step 2'],
    ['title' => 'Payment',  'time' => 'Step 3'],
    ['title' => 'Done',     'time' => 'Step 4'],
]" />
載入中…
無法載入 HTML

compact: 將所有 items 靠向一側

  • 2025/06
    Requirements
    Client hearing complete


  • 2025/07
    Design
    API and data model finalized


  • 2025/08
    Implementation
    Core feature development


  • 2025/09
    Release
    Shipped to production
<x-timeline compact :items="[
    ['title' => 'Requirements',   'time' => '2025/06', 'desc' => 'Client hearing complete'],
    ['title' => 'Design',         'time' => '2025/07', 'desc' => 'API and data model finalized'],
    ['title' => 'Implementation', 'time' => '2025/08', 'desc' => 'Core feature development'],
    ['title' => 'Release',        'time' => '2025/09', 'desc' => 'Shipped to production'],
]" />
載入中…
無法載入 HTML

snap: 將 middle icon 吸附到頂端

  • Week 1
    Research
    Market research and competitor analysis


  • Week 2
    Prototype
    MVP UI in Figma


  • Week 3
    User test
    Five moderated sessions


  • Week 4
    Implementation
    Build the validated flow
<x-timeline snap :items="[
    ['title' => 'Research',       'time' => 'Week 1', 'desc' => 'Market research and competitor analysis'],
    ['title' => 'Prototype',      'time' => 'Week 2', 'desc' => 'MVP UI in Figma'],
    ['title' => 'User test',      'time' => 'Week 3', 'desc' => 'Five moderated sessions'],
    ['title' => 'Implementation', 'time' => 'Week 4', 'desc' => 'Build the validated flow'],
]" />
載入中…
無法載入 HTML

state per item: done / current / upcoming 會改變 icon·connector 的顏色

  • 10/01 09:12
    Order received
    Completed


  • 10/01 10:30
    Payment confirmed
    Completed


  • 10/02
    Preparing shipment
    In progress


  • scheduled
    Delivery
    Not started


  • scheduled
    Receipt confirmed
    Not started
<x-timeline :items="[
    ['title' => 'Order received',     'time' => '10/01 09:12', 'desc' => 'Completed', 'state' => 'done'],
    ['title' => 'Payment confirmed',  'time' => '10/01 10:30', 'desc' => 'Completed', 'state' => 'done'],
    ['title' => 'Preparing shipment', 'time' => '10/02',       'desc' => 'In progress', 'state' => 'current'],
    ['title' => 'Delivery',           'time' => 'scheduled',   'desc' => 'Not started', 'state' => 'upcoming'],
    ['title' => 'Receipt confirmed',  'time' => 'scheduled',   'desc' => 'Not started', 'state' => 'upcoming'],
]" />
載入中…
無法載入 HTML

appearance — solid (default, saturated) vs soft (opt-in, muted)

  • done
    Step 1


  • done
    Step 2


  • done
    Step 3


  • current
    Step 4


  • upcoming
    Step 5
  • done
    Step 1


  • done
    Step 2


  • done
    Step 3


  • current
    Step 4


  • upcoming
    Step 5
<x-timeline :items="[
    ['title' => 'Step 1', 'time' => 'done',     'state' => 'done'],
    ['title' => 'Step 2', 'time' => 'done',     'state' => 'done'],
    ['title' => 'Step 3', 'time' => 'done',     'state' => 'done'],
    ['title' => 'Step 4', 'time' => 'current',  'state' => 'current'],
    ['title' => 'Step 5', 'time' => 'upcoming', 'state' => 'upcoming'],
]" />
<x-timeline appearance="soft" :items="[
    ['title' => 'Step 1', 'time' => 'done',     'state' => 'done'],
    ['title' => 'Step 2', 'time' => 'done',     'state' => 'done'],
    ['title' => 'Step 3', 'time' => 'done',     'state' => 'done'],
    ['title' => 'Step 4', 'time' => 'current',  'state' => 'current'],
    ['title' => 'Step 5', 'time' => 'upcoming', 'state' => 'upcoming'],
]" />
載入中…
無法載入 HTML

solid (左) = 預設的 text-primary / bg-primary。soft (右) = done icon 變為 text-primary/70、connector 變為 bg-primary/30,呈現柔和效果。