Timeline#
이벤트나 활동 내역을 시간 순서대로 시각적으로 나열하는 컴포넌트입니다.
Live Preview#
Web
10:00 AM
Order placed
11:30 AM
Processing
2:00 PM
Shipped
Flutter
Loading Flutter...
class TimelineDefaultExample extends StatelessComponent {
const TimelineDefaultExample({super.key});
@override
Component build(BuildContext context) {
return Timeline(
items: [
CoreTimelineItem(title: 'Order placed', timestamp: '10:00 AM'),
CoreTimelineItem(title: 'Processing', timestamp: '11:30 AM'),
CoreTimelineItem(title: 'Shipped', timestamp: '2:00 PM'),
],
);
}
}
class TimelineDefaultExample extends StatelessWidget {
const TimelineDefaultExample({super.key});
@override
Widget build(BuildContext context) {
return Timeline(
items: [
CoreTimelineItem(title: 'Order placed', timestamp: '10:00 AM'),
CoreTimelineItem(title: 'Processing', timestamp: '11:30 AM'),
CoreTimelineItem(title: 'Shipped', timestamp: '2:00 PM'),
],
);
}
}
사용 시기 (When to Use)#
이 컴포넌트를 사용하세요:
- 활동 이력, 변경 로그를 시간 순서로 나열할 때
- 각 이벤트에 제목, 날짜, 상세 설명이 필요할 때
대신 다른 컴포넌트를 사용하세요:
Steps: 단계 간 진행형 프로세스Stepper: 다단계 폼
기본 사용법 (Basic Usage)#
Timeline(
items: [
CoreTimelineItem(
title: 'Order placed',
timestamp: '10:00 AM',
description: 'Your order has been received.',
),
CoreTimelineItem(
title: 'Processing',
timestamp: '11:30 AM',
),
CoreTimelineItem(
title: 'Shipped',
timestamp: '2:00 PM',
),
],
)
Timeline(
items: [
CoreTimelineItem(
title: 'Order placed',
timestamp: '10:00 AM',
description: 'Your order has been received.',
),
CoreTimelineItem(
title: 'Processing',
timestamp: '11:30 AM',
),
CoreTimelineItem(
title: 'Shipped',
timestamp: '2:00 PM',
),
],
)
Props / Parameters#
| 속성 | 타입 | 기본값 | 설명 |
|---|---|---|---|
items |
List<CoreTimelineItem> |
필수 | 타임라인 아이템 목록 |
timeConstraints |
BoxConstraints? (Flutter) |
120px 고정 |
시간 컬럼 너비 (Flutter 전용) |
timelineStyle |
CoreTimelineStyle? |
null |
인스턴스 스타일 (Style 시스템 참조) |
스타일 시스템 (Style System)#
Timeline 의 모든 chrome / dimensional / nested-slot 오버라이드는 CoreTimelineStyle 단일 슬롯으로 흐릅니다 (Epic #1302 원칙 6/7/8, Phase 6f 이후 phantom generic 제거). 시맨틱 enum (orientation) 은 위젯 파라미터로 직접 전달합니다.
시맨틱 vs 스타일#
- 시맨틱 / behaviour: 위젯 파라미터로 직접 (
items,timeConstraints) -
chrome / dimensional / 슬롯 스타일:
CoreTimelineStyle한 곳으로 (dotColor/dotSize/dotBorderColor/dotBorderWidth/connectorColor/connectorThickness/rowSpacing/columnGapStyle/contentTopGapStyle/timestampTextStyle/titleTextStyle/descriptionTextStyle)
Resolve chain#
design system default for timeline
→ CoreTimelineTheme.style // 프로젝트 공통
→ parent component slot override
→ widget.timelineStyle // 인스턴스별
각 nested 슬롯 스타일 (timestampTextStyle / titleTextStyle / descriptionTextStyle) 은
CoreTextStyle 자체 resolve chain 으로 다시 한 번 머지됩니다.
슬롯 매핑 (CoreTimelineStyle 12 필드)#
| 필드 | 타입 (Flutter) | 적용 영역 |
|---|---|---|
dotColor | CoreColor? | 점(dot) 색 |
dotSize | double? | 점 지름 (px) |
dotBorderColor | CoreColor? | 점 테두리 색 |
dotBorderWidth | double? | 점 테두리 두께 (px) |
connectorColor | CoreColor? | 연결선 색 |
connectorThickness | double? | 연결선 두께 (px) |
rowSpacing |
double? |
행 (블록) 사이 세로 간격 (px) — native Column.spacing / gap rem 으로 분배 |
columnGapStyle |
CoreGapStyle? |
timestamp / dot / content 컬럼 사이 가로 1-off Gap |
contentTopGapStyle |
CoreGapStyle? |
title ↔ description 1-off Gap |
timestampTextStyle | CoreTextStyle? | 타임스탬프 텍스트 스타일 |
titleTextStyle | CoreTextStyle? | 제목 텍스트 스타일 |
descriptionTextStyle | CoreTextStyle? | 설명 텍스트 스타일 |
동작 스펙 (Behavior)#
- 수직으로 이벤트를 나열
- 점(dot) + 세로 연결선으로 시간 흐름 표현
- 마지막 아이템에는 연결선 없음
접근성 (Accessibility)#
- Flutter: Semantics로 이벤트 정보 전달
- Web: 의미론적 HTML 구조
크로스 플랫폼 차이점 (Platform Differences)#
| 항목 | Flutter | Web |
|---|---|---|
| 클래스명 | Timeline | Timeline |
| 렌더링 | Column + Row + VerticalDivider |
div + CSS flex |
| 시간 컬럼 | timeConstraints 파라미터 | 고정 120px |