탐색

v2.1.0
데이터 표시

타임라인

활동 피드, 이력, 변경 로그처럼 이벤트를 발생 순서대로 하나의 선을 따라 보여 줍니다.

이 페이지의 내용

타임라인은 활동 피드, 배포 이력, 변경 기록처럼 이벤트를 발생 순서대로 하나의 선을 따라 배열하는 목록입니다. 각 이벤트의 표시를 한 열에 배치하고 그 옆에 설명을 놓습니다. 가는 선으로 표시를 연결합니다.

타임라인

<ol class="timeline max-w(360) mx-auto">  <li class="timeline-item" aria-current="true">    <span class="timeline-marker"></span>    <div class="timeline-body">      <p class="timeline-title">Deployed to production</p>      <p class="timeline-description">atlas.dev is live in 14 regions.</p>      <time class="timeline-time" datetime="2026-11-11T09:42Z">2 minutes ago</time>    </div>  </li>  <li class="timeline-item">    <span class="timeline-marker"></span>    <div class="timeline-body">      <p class="timeline-title">Build completed</p>      <p class="timeline-description">38 routes compiled in 48 seconds.</p>      <time class="timeline-time" datetime="2026-11-11T09:41Z">3 minutes ago</time>    </div>  </li>  <li class="timeline-item">    <span class="timeline-marker"></span>    <div class="timeline-body">      <p class="timeline-title">Commit pushed to main</p>      <time class="timeline-time" datetime="2026-11-11T09:40Z">4 minutes ago</time>    </div>  </li></ol>
<ol className="timeline max-w(360) mx-auto">  <li className="timeline-item" aria-current="true">    <span className="timeline-marker"></span>    <div className="timeline-body">      <p className="timeline-title">Deployed to production</p>      <p className="timeline-description">atlas.dev is live in 14 regions.</p>      <time className="timeline-time" dateTime="2026-11-11T09:42Z">2 minutes ago</time>    </div>  </li>  <li className="timeline-item">    <span className="timeline-marker"></span>    <div className="timeline-body">      <p className="timeline-title">Build completed</p>      <p className="timeline-description">38 routes compiled in 48 seconds.</p>      <time className="timeline-time" dateTime="2026-11-11T09:41Z">3 minutes ago</time>    </div>  </li>  <li className="timeline-item">    <span className="timeline-marker"></span>    <div className="timeline-body">      <p className="timeline-title">Commit pushed to main</p>      <time className="timeline-time" dateTime="2026-11-11T09:40Z">4 minutes ago</time>    </div>  </li></ol>
<ol class="timeline max-w(360) mx-auto">  <li class="timeline-item" aria-current="true">    <span class="timeline-marker"></span>    <div class="timeline-body">      <p class="timeline-title">Deployed to production</p>      <p class="timeline-description">atlas.dev is live in 14 regions.</p>      <time class="timeline-time" datetime="2026-11-11T09:42Z">2 minutes ago</time>    </div>  </li>  <li class="timeline-item">    <span class="timeline-marker"></span>    <div class="timeline-body">      <p class="timeline-title">Build completed</p>      <p class="timeline-description">38 routes compiled in 48 seconds.</p>      <time class="timeline-time" datetime="2026-11-11T09:41Z">3 minutes ago</time>    </div>  </li>  <li class="timeline-item">    <span class="timeline-marker"></span>    <div class="timeline-body">      <p class="timeline-title">Commit pushed to main</p>      <time class="timeline-time" datetime="2026-11-11T09:40Z">4 minutes ago</time>    </div>  </li></ol>
<template>  <ol class="timeline max-w(360) mx-auto">    <li class="timeline-item" aria-current="true">      <span class="timeline-marker"></span>      <div class="timeline-body">        <p class="timeline-title">Deployed to production</p>        <p class="timeline-description">atlas.dev is live in 14 regions.</p>        <time class="timeline-time" datetime="2026-11-11T09:42Z">2 minutes ago</time>      </div>    </li>    <li class="timeline-item">      <span class="timeline-marker"></span>      <div class="timeline-body">        <p class="timeline-title">Build completed</p>        <p class="timeline-description">38 routes compiled in 48 seconds.</p>        <time class="timeline-time" datetime="2026-11-11T09:41Z">3 minutes ago</time>      </div>    </li>    <li class="timeline-item">      <span class="timeline-marker"></span>      <div class="timeline-body">        <p class="timeline-title">Commit pushed to main</p>        <time class="timeline-time" datetime="2026-11-11T09:40Z">4 minutes ago</time>      </div>    </li>  </ol></template>

#이벤트 표시

내용이 없는 timeline-marker는 작은 점으로 표시됩니다. aria-current 속성이 지정된 이벤트는 가장 최근 이벤트나 독자가 현재 보고 있는 이벤트를 나타내며, 진한 색과 옅은 테두리 효과로 강조됩니다. icon을 담은 표시는 그 주위에 작은 오목한 영역을 만듭니다. :has()가 표시 형태를 결정하므로 한 피드에서 두 형태를 함께 사용할 수 있습니다.

아이콘이 있는 타임라인

<ol class="timeline max-w(360) mx-auto">  <li class="timeline-item">    <span class="timeline-marker">      <svg class="icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">        <path d="M3 8L6.3532 11.3532A0.2 0.2 0 0 0 6.6412 11.3479L13 4.5" />      </svg>    </span>    <div class="timeline-body">      <p class="timeline-title">Ada approved the change</p>      <time class="timeline-time">Today at 09:12</time>    </div>  </li>  <li class="timeline-item">    <span class="timeline-marker">      <svg class="icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">        <path d="M3.5 2.5L12.5 2.5A1 1 0 0 1 13.5 3.5L13.5 10A1 1 0 0 1 12.5 11L7.777 11A1 1 0 0 0 7.2625 11.1425L4.0145 13.0913A1 1 0 0 1 2.5 12.2338L2.5 3.5A1 1 0 0 1 3.5 2.5Z" />      </svg>    </span>    <div class="timeline-body">      <p class="timeline-title">Alan left a comment</p>      <p class="timeline-description">The focus ring is cut by the mask. Move it to the group.</p>      <time class="timeline-time">Yesterday at 17:40</time>    </div>  </li>  <li class="timeline-item">    <span class="timeline-marker"></span>    <div class="timeline-body">      <p class="timeline-title">Pull request opened</p>      <time class="timeline-time">Yesterday at 16:05</time>    </div>  </li></ol>
import CheckIcon from '@master/icons-react/native/16/soft/check'import MessageIcon from '@master/icons-react/native/16/soft/message'<ol className="timeline max-w(360) mx-auto">  <li className="timeline-item">    <span className="timeline-marker"><CheckIcon className="icon" /></span>    <div className="timeline-body">      <p className="timeline-title">Ada approved the change</p>      <time className="timeline-time">Today at 09:12</time>    </div>  </li>  <li className="timeline-item">    <span className="timeline-marker"><MessageIcon className="icon" /></span>    <div className="timeline-body">      <p className="timeline-title">Alan left a comment</p>      <p className="timeline-description">        The focus ring is cut by the mask. Move it to the group.      </p>      <time className="timeline-time">Yesterday at 17:40</time>    </div>  </li>  <li className="timeline-item">    <span className="timeline-marker"></span>    <div className="timeline-body">      <p className="timeline-title">Pull request opened</p>      <time className="timeline-time">Yesterday at 16:05</time>    </div>  </li></ol>
<script>  import CheckIcon from '@master/icons-svelte/native/16/soft/check'  import MessageIcon from '@master/icons-svelte/native/16/soft/message'</script><ol class="timeline max-w(360) mx-auto">  <li class="timeline-item">    <span class="timeline-marker"><CheckIcon class="icon" /></span>    <div class="timeline-body">      <p class="timeline-title">Ada approved the change</p>      <time class="timeline-time">Today at 09:12</time>    </div>  </li>  <li class="timeline-item">    <span class="timeline-marker"><MessageIcon class="icon" /></span>    <div class="timeline-body">      <p class="timeline-title">Alan left a comment</p>      <p class="timeline-description">The focus ring is cut by the mask. Move it to the group.</p>      <time class="timeline-time">Yesterday at 17:40</time>    </div>  </li>  <li class="timeline-item">    <span class="timeline-marker"></span>    <div class="timeline-body">      <p class="timeline-title">Pull request opened</p>      <time class="timeline-time">Yesterday at 16:05</time>    </div>  </li></ol>
<script setup>import CheckIcon from '@master/icons-vue/native/16/soft/check'import MessageIcon from '@master/icons-vue/native/16/soft/message'</script><template>  <ol class="timeline max-w(360) mx-auto">    <li class="timeline-item">      <span class="timeline-marker"><CheckIcon class="icon" /></span>      <div class="timeline-body">        <p class="timeline-title">Ada approved the change</p>        <time class="timeline-time">Today at 09:12</time>      </div>    </li>    <li class="timeline-item">      <span class="timeline-marker"><MessageIcon class="icon" /></span>      <div class="timeline-body">        <p class="timeline-title">Alan left a comment</p>        <p class="timeline-description">The focus ring is cut by the mask. Move it to the group.</p>        <time class="timeline-time">Yesterday at 17:40</time>      </div>    </li>    <li class="timeline-item">      <span class="timeline-marker"></span>      <div class="timeline-body">        <p class="timeline-title">Pull request opened</p>        <time class="timeline-time">Yesterday at 16:05</time>      </div>    </li>  </ol></template>

#타임라인과 단계

타임라인은 이미 일어난 일을 기록합니다. 항목 수는 정해져 있지 않으며 모든 이벤트는 완료된 상태입니다. 단계는 독자가 정해진 순서대로 진행하는 과정을 보여 줍니다. 현재 단계는 하나이며 나머지 단계는 앞으로 진행할 단계입니다. 진행 중인 작업은 트레이스로 표시합니다. 단계는 실행 중이거나 실패한 상태일 수 있으며, 펼쳐서 세부 내용을 볼 수 있습니다.

#접근성

  • 순서가 중요한 경우에는 <ol>을 사용하세요. 타임라인은 거의 항상 순서가 중요합니다. 각 이벤트의 시각은 datetime 속성을 지정한 <time> 요소로 표시하세요.
  • 표시와 연결선은 스타일시트가 그리며 스크린 리더가 읽지 않습니다. 표시에 들어가는 아이콘은 장식이므로 어떤 일이 있었는지는 제목에 적으세요.
  • 화면에 표시된 상태에서 업데이트되는 피드는 aria-live="polite"를 지정해 라이브 영역으로 만드세요.

#클래스

클래스설명
timeline목록
timeline-item이벤트 하나를 나타내며, 아주 가는 선으로 해당 이벤트의 표식과 다음 이벤트의 표식을 잇습니다.
timeline-marker내용이 없으면 작은 점으로, 아이콘이 있으면 아이콘을 감싸는 작은 오목한 영역으로 표시합니다
timeline-body표식 옆의 텍스트
timeline-title발생한 일을 진한 글자색으로 표시합니다.
timeline-description세부 정보를 더 낮은 강조도로 표시하는 한 줄 문구입니다.
timeline-time발생 시각을 너비가 일정한 숫자로 표시합니다.

#사용자 지정 속성

속성기본값설명
--timeline-marker1.5rem표식 열의 너비입니다.

#소스

@master/ui/components/timeline.css
/* * Timeline: events in the order they happened, as a list on one line. * Each event has a marker on a column and its words beside it; a hairline joins the markers. A bare marker * is a small dot, and a marker that holds an icon becomes a small well around it. */@layer components.ui {  .timeline {    --timeline-marker: 1.5rem;    display: flex;    flex-direction: column;    min-width: 0;    margin: 0;    padding: 0;    color: var(--color-text-body);    font-size: .875rem;    line-height: 1.5;    list-style: none;  }  .timeline-item {    position: relative;    display: flex;    align-items: flex-start;    gap: .75rem;    min-width: 0;    padding-block-end: 1.25rem;    &:last-child {      padding-block-end: 0;    }    /*     * The line runs from under this marker to the next one, 2px clear of each. A marker sits centered on the     * first line, (1lh - --timeline-marker) / 2 from the item's top, so both ends are counted from there.     */    &:not(:last-child)::before {      content: '';      position: absolute;      inset-block: calc((1lh + var(--timeline-marker)) / 2 + .125rem) calc(.125rem - (1lh - var(--timeline-marker)) / 2);      inset-inline-start: calc(var(--timeline-marker) / 2 - .5px);      width: 1px;      background: var(--color-line-divider);    }    @media (forced-colors: active) {      &:not(:last-child)::before {        background: CanvasText;      }    }  }  /* The marker's column is as tall as the first line of text, so the dot sits on that line. */  .timeline-marker {    --icon-size: .875rem;    --icon-color: var(--color-text-muted);    display: grid;    flex: none;    place-items: center;    width: var(--timeline-marker);    height: var(--timeline-marker);    margin-block: calc((1lh - var(--timeline-marker)) / 2);    border-radius: 999px;    /* Bare: a dot. */    &:empty::before {      content: '';      width: .4375rem;      height: .4375rem;      border-radius: 999px;      background: var(--color-line-mark);    }    /* With an icon: a small well around it. */    &:has(.icon) {      background: var(--color-surface-inset);      box-shadow: var(--shadow-pressed);    }    @media (forced-colors: active) {      &:empty::before {        background: CanvasText;      }      &:has(.icon) {        outline: 1px solid CanvasText;        outline-offset: -1px;      }    }  }  /* The newest or current event: its dot takes ink. */  .timeline-item[aria-current]:not([aria-current="false"]) .timeline-marker:empty::before {    background: var(--color-text-strong);    box-shadow: 0 0 0 3px color-mix(in oklab, var(--color-text-strong) 12%, transparent);    /* A color that is not a system color would turn to Canvas here and the dot would vanish. */    @media (forced-colors: active) {      background: Highlight;    }  }  .timeline-body {    display: grid;    flex: 1 1 0;    gap: .125rem;    min-width: 0;  }  .timeline-title {    margin: 0;    color: var(--color-text-strong);    font-weight: var(--font-weight-control);    text-wrap: balance;    overflow-wrap: anywhere;  }  .timeline-description {    margin: 0;    color: var(--color-text-muted);    font-size: .8125rem;    text-wrap: pretty;    overflow-wrap: anywhere;  }  /* When it happened: a quiet line in tabular figures. */  .timeline-time {    margin: 0;    color: var(--color-text-muted);    font-size: .75rem;    font-variant-numeric: tabular-nums;  }}