Timeline
Timeline component
Install
npx ui8kit add timelinePulls in: box, compose, inline, kit-box, kit-text, list, list-item, text, utils
Preview
Plan upgraded to Team
2 min ago
Billing changed by Dana Pierce.
New member joined
1 h ago
Ravi Menon accepted the invitation.
Export finished
Yesterday
Customers.csv is ready to download.
Payment failed
2 days ago
The card ending 4242 was declined.
Code
Point the CLI at this runtime once, then add the item:
npx ui8kit init --yes --framework svelte --dir src --registry-url https://registry.buildy.tw/svelte --strict-cdnnpx ui8kit add timeline<!-- Code generated by packages/kit-compose/src/organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT. -->
<!--
A vertical list of events (an order's history): a dot on a line, the title, an optional text and the time.
Newest first or oldest first is the caller's order.
-->
<script lang="ts" module>
import type { Snippet } from "svelte";
import type { TimelineItem } from "./timeline.types";
export type TimelineProps = {
items: TimelineItem[];
class?: string;
};
</script>
<script lang="ts">
import Box from "../compose/Box.svelte";
import Inline from "../compose/Inline.svelte";
import List from "../compose/List.svelte";
import ListItem from "../compose/ListItem.svelte";
import Text from "../compose/Text.svelte";
import { at, cn } from "../utils";
const TONE_DOT: Record<string, string> = {
"gray": "bg-muted-foreground",
"green": "bg-emerald-500",
"blue": "bg-blue-500",
"amber": "bg-amber-500",
"red": "bg-red-500",
};
let { items, class: className }: TimelineProps = $props();
</script>
<Box class={cn("min-w-0", className)} data-slot="timeline">
<List class="m-0 flex list-none flex-col p-0">
{#each items as item, i (item.id)}
<ListItem class="relative flex min-w-0 gap-4 pb-4 last:pb-0" data-event={item.id} data-slot="timeline-item">
<Box class="relative flex w-2 shrink-0 justify-center">
{#if (i < ((items?.length ?? 0) - 1))}
<Inline class="absolute top-4 -bottom-0 w-px bg-border" />
{/if}
<Inline class={cn("mt-2 size-2 rounded-full", at(TONE_DOT, (item.tone ?? "gray")))} />
</Box>
<Box class="flex min-w-0 flex-1 flex-col gap-0">
<Box class="flex flex-wrap items-baseline justify-between gap-x-4">
<Text class="m-0 text-sm font-bold text-foreground">
{item.title}
</Text>
<Text class="m-0 shrink-0 text-xs font-medium text-muted-foreground">
{item.time}
</Text>
</Box>
{#if item.text}
<Text class="m-0 text-xs font-medium text-muted-foreground">
{item.text}
</Text>
{/if}
</Box>
</ListItem>
{/each}
</List>
</Box>
// Code generated by packages/kit-compose/src/organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT.
export type TimelineItem = {
id: string;
title: string;
text?: string;
time: string;
tone?: string;
};
Point the CLI at this runtime once, then add the item:
npx ui8kit init --yes --framework react --dir src --registry-url https://registry.buildy.tw/react --strict-cdnnpx ui8kit add timeline// Code generated by packages/kit-compose/src/organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT.
/**
* A vertical list of events (an order's history): a dot on a line, the title, an optional text and the time.
* Newest first or oldest first is the caller's order.
*/
import { type ReactNode } from "react";
import { Box, Inline, List, ListItem, Text } from "../compose";
import { at, cn } from "../utils";
import type { TimelineItem } from "./timeline.types";
const TONE_DOT: Record<string, string> = {
"gray": "bg-muted-foreground",
"green": "bg-emerald-500",
"blue": "bg-blue-500",
"amber": "bg-amber-500",
"red": "bg-red-500",
};
export type TimelineProps = {
items: TimelineItem[];
className?: string;
};
export function Timeline({ items, className }: TimelineProps) {
return (
<Box className={cn("min-w-0", className)} data-slot="timeline">
<List className="m-0 flex list-none flex-col p-0">
{(items ?? []).map((item, i) => (
<ListItem key={item.id} className="relative flex min-w-0 gap-4 pb-4 last:pb-0" data-event={item.id} data-slot="timeline-item">
<Box className="relative flex w-2 shrink-0 justify-center">
{(i < ((items?.length ?? 0) - 1)) ? (
<Inline className="absolute top-4 -bottom-0 w-px bg-border" />
) : null}
<Inline className={cn("mt-2 size-2 rounded-full", at(TONE_DOT, (item.tone ?? "gray")))} />
</Box>
<Box className="flex min-w-0 flex-1 flex-col gap-0">
<Box className="flex flex-wrap items-baseline justify-between gap-x-4">
<Text className="m-0 text-sm font-bold text-foreground">
{item.title}
</Text>
<Text className="m-0 shrink-0 text-xs font-medium text-muted-foreground">
{item.time}
</Text>
</Box>
{item.text ? (
<Text className="m-0 text-xs font-medium text-muted-foreground">
{item.text}
</Text>
) : null}
</Box>
</ListItem>
))}
</List>
</Box>
);
}
// Code generated by packages/kit-compose/src/organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT.
export type TimelineItem = {
id: string;
title: string;
text?: string;
time: string;
tone?: string;
};
Point the CLI at this runtime once, then add the item:
npx ui8kit init --yes --framework vue --dir src --registry-url https://registry.buildy.tw/vue --strict-cdnnpx ui8kit add timeline// Code generated by packages/kit-compose/src/organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT.
export type TimelineItem = {
id: string;
title: string;
text?: string;
time: string;
tone?: string;
};
<!-- Code generated by packages/kit-compose/src/organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT. -->
<!--
A vertical list of events (an order's history): a dot on a line, the title, an optional text and the time.
Newest first or oldest first is the caller's order.
-->
<script lang="ts">
import type { TimelineItem } from "./timeline.types";
export type TimelineProps = {
items: TimelineItem[];
class?: string;
};
</script>
<script setup lang="ts">
import Box from "../compose/Box.vue";
import Inline from "../compose/Inline.vue";
import List from "../compose/List.vue";
import ListItem from "../compose/ListItem.vue";
import Text from "../compose/Text.vue";
import { at, cn } from "../utils";
const TONE_DOT: Record<string, string> = {
"gray": "bg-muted-foreground",
"green": "bg-emerald-500",
"blue": "bg-blue-500",
"amber": "bg-amber-500",
"red": "bg-red-500",
};
const { items, class: className } = defineProps<TimelineProps>();
</script>
<template>
<Box :class="cn('min-w-0', className)" data-slot="timeline">
<List class="m-0 flex list-none flex-col p-0">
<ListItem
v-for="(item, i) in items"
:key="item.id"
class="relative flex min-w-0 gap-4 pb-4 last:pb-0"
:data-event="item.id"
data-slot="timeline-item"
>
<Box class="relative flex w-2 shrink-0 justify-center">
<Inline v-if="(i < ((items?.length ?? 0) - 1))" class="absolute top-4 -bottom-0 w-px bg-border" />
<Inline :class="cn('mt-2 size-2 rounded-full', at(TONE_DOT, (item.tone ?? 'gray')))" />
</Box>
<Box class="flex min-w-0 flex-1 flex-col gap-0">
<Box class="flex flex-wrap items-baseline justify-between gap-x-4">
<Text class="m-0 text-sm font-bold text-foreground">
{{ item.title }}
</Text>
<Text class="m-0 shrink-0 text-xs font-medium text-muted-foreground">
{{ item.time }}
</Text>
</Box>
<Text v-if="item.text" class="m-0 text-xs font-medium text-muted-foreground">
{{ item.text }}
</Text>
</Box>
</ListItem>
</List>
</Box>
</template>
Point the CLI at this runtime once, then add the item:
npx ui8kit init --yes --framework solid --dir src --registry-url https://registry.buildy.tw/solid --strict-cdnnpx ui8kit add timeline// Code generated by packages/kit-compose/src/organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT.
/**
* A vertical list of events (an order's history): a dot on a line, the title, an optional text and the time.
* Newest first or oldest first is the caller's order.
*/
import { For, type JSX } from "solid-js";
import { Box, Inline, List, ListItem, Text } from "../compose";
import { at, cn } from "../utils";
import type { TimelineItem } from "./timeline.types";
const TONE_DOT: Record<string, string> = {
"gray": "bg-muted-foreground",
"green": "bg-emerald-500",
"blue": "bg-blue-500",
"amber": "bg-amber-500",
"red": "bg-red-500",
};
export type TimelineProps = {
items: TimelineItem[];
class?: string;
};
export function Timeline({ items, class: className }: TimelineProps) {
return (
<Box class={cn("min-w-0", className)} data-slot="timeline">
<List class="m-0 flex list-none flex-col p-0">
<For each={items ?? []}>{(item, iOf) => { const i = iOf(); return (
<ListItem class="relative flex min-w-0 gap-4 pb-4 last:pb-0" data-event={item.id} data-slot="timeline-item">
<Box class="relative flex w-2 shrink-0 justify-center">
{(i < ((items?.length ?? 0) - 1)) ? (
<Inline class="absolute top-4 -bottom-0 w-px bg-border" />
) : null}
<Inline class={cn("mt-2 size-2 rounded-full", at(TONE_DOT, (item.tone ?? "gray")))} />
</Box>
<Box class="flex min-w-0 flex-1 flex-col gap-0">
<Box class="flex flex-wrap items-baseline justify-between gap-x-4">
<Text class="m-0 text-sm font-bold text-foreground">
{item.title}
</Text>
<Text class="m-0 shrink-0 text-xs font-medium text-muted-foreground">
{item.time}
</Text>
</Box>
{item.text ? (
<Text class="m-0 text-xs font-medium text-muted-foreground">
{item.text}
</Text>
) : null}
</Box>
</ListItem>
); }}</For>
</List>
</Box>
);
}
// Code generated by packages/kit-compose/src/organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT.
export type TimelineItem = {
id: string;
title: string;
text?: string;
time: string;
tone?: string;
};
Point the CLI at this runtime once, then add the item:
npx ui8kit init --yes --framework templ --dir src --registry-url https://registry.buildy.tw/templ --strict-cdnnpx ui8kit add timeline// Code generated by packages/kit-compose/src/server-organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT.
// Source: packages/compose-gen/specs/parts/timeline.json
package blocks
import (
"github.com/ui8kit/codegen/generated/templ/ui/box"
"github.com/ui8kit/codegen/generated/templ/compose"
"github.com/ui8kit/codegen/generated/templ/ui/text"
uiutils "github.com/ui8kit/codegen/generated/templ/orgutils"
)
// TimelineProps are the props of Timeline; the values are the JSON shapes of the TypeScript props.
type TimelineProps struct {
Items any `json:"items"`
Class string `json:"className"`
}
var timelineToneDot = map[string]any{
"gray": "bg-muted-foreground",
"green": "bg-emerald-500",
"blue": "bg-blue-500",
"amber": "bg-amber-500",
"red": "bg-red-500",
}
// A vertical list of events (an order's history): a dot on a line, the title, an optional text and the time. Newest first or oldest first is the caller's order.
templ Timeline(p TimelineProps) {
{{ vItems := p.Items }}
@compose.Box(compose.BoxProps{BoxProps: box.BoxProps{Class: uiutils.S(uiutils.Cnv("min-w-0", p.Class)), Attrs: uiutils.Attrs("data-slot", "timeline")}}) {
@compose.List(compose.ListProps{BoxProps: box.BoxProps{Class: "m-0 flex list-none flex-col p-0"}}) {
for vI, vItem := range uiutils.L(vItems) {
@compose.ListItem(compose.ListItemProps{BoxProps: box.BoxProps{Class: "relative flex min-w-0 gap-4 pb-4 last:pb-0", Attrs: uiutils.Attrs("data-event", uiutils.Get(vItem, "id"), "data-slot", "timeline-item")}}) {
@compose.Box(compose.BoxProps{BoxProps: box.BoxProps{Class: "relative flex w-2 shrink-0 justify-center"}}) {
if uiutils.T(uiutils.Lt(float64(vI), uiutils.Sub(uiutils.Len(vItems), float64(1)))) {
@compose.Inline(compose.InlineProps{TextProps: text.TextProps{Class: "absolute top-4 -bottom-0 w-px bg-border"}})
}
@compose.Inline(compose.InlineProps{TextProps: text.TextProps{Class: uiutils.S(uiutils.Cnv("mt-2 size-2 rounded-full", uiutils.At(timelineToneDot, uiutils.Coalesce(uiutils.Get(vItem, "tone"), "gray"))))}})
}
@compose.Box(compose.BoxProps{BoxProps: box.BoxProps{Class: "flex min-w-0 flex-1 flex-col gap-0"}}) {
@compose.Box(compose.BoxProps{BoxProps: box.BoxProps{Class: "flex flex-wrap items-baseline justify-between gap-x-4"}}) {
@compose.Text(compose.TextProps{TextProps: text.TextProps{Class: "m-0 text-sm font-bold text-foreground"}}) {
{ uiutils.Text(uiutils.Get(vItem, "title")) }
}
@compose.Text(compose.TextProps{TextProps: text.TextProps{Class: "m-0 shrink-0 text-xs font-medium text-muted-foreground"}}) {
{ uiutils.Text(uiutils.Get(vItem, "time")) }
}
}
if uiutils.T(uiutils.Get(vItem, "text")) {
@compose.Text(compose.TextProps{TextProps: text.TextProps{Class: "m-0 text-xs font-medium text-muted-foreground"}}) {
{ uiutils.Text(uiutils.Get(vItem, "text")) }
}
}
}
}
}
}
}
}
Point the CLI at this runtime once, then add the item:
npx ui8kit init --yes --framework twig --dir src --registry-url https://registry.buildy.tw/twig --strict-cdnnpx ui8kit add timeline{#- Code generated by packages/kit-compose/src/server-organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT.
Source: packages/compose-gen/specs/parts/timeline.json
A vertical list of events (an order's history): a dot on a line, the title, an optional text and the time. Newest first or oldest first is the caller's order.
Props (p): items, className. -#}
{%- set k_TONE_DOT = {'gray': 'bg-muted-foreground', 'green': 'bg-emerald-500', 'blue': 'bg-blue-500', 'amber': 'bg-amber-500', 'red': 'bg-red-500'} -%}
{%- set v_items = (p.items ?? null) -%}
{%- set c_9 -%}
{%- set c_8 -%}
{%- for v_item in og_l(v_items) %}
{%- set v_i = loop.index0 -%}
{%- set c_7 -%}
{%- set c_1 -%}
{%- if og_t(og_lt(v_i, og_sub(og_len(v_items), 1))) %}
{{ include('compose/Inline.html.twig', {'class': 'absolute top-4 -bottom-0 w-px bg-border'}, with_context = false) }}
{%- endif %}
{{ include('compose/Inline.html.twig', {'class': og_s(og_cnv(['mt-2 size-2 rounded-full', og_at(k_TONE_DOT, og_coalesce([og_get(v_item, ['tone']), 'gray']))]))}, with_context = false) }}
{%- endset -%}
{{ include('compose/Box.html.twig', {'class': 'relative flex w-2 shrink-0 justify-center', 'children': c_1}, with_context = false) }}
{%- set c_6 -%}
{%- set c_4 -%}
{%- set c_2 -%}
{{ og_text(og_get(v_item, ['title'])) }}
{%- endset -%}
{{ include('compose/Text.html.twig', {'class': 'm-0 text-sm font-bold text-foreground', 'children': c_2}, with_context = false) }}
{%- set c_3 -%}
{{ og_text(og_get(v_item, ['time'])) }}
{%- endset -%}
{{ include('compose/Text.html.twig', {'class': 'm-0 shrink-0 text-xs font-medium text-muted-foreground', 'children': c_3}, with_context = false) }}
{%- endset -%}
{{ include('compose/Box.html.twig', {'class': 'flex flex-wrap items-baseline justify-between gap-x-4', 'children': c_4}, with_context = false) }}
{%- if og_t(og_get(v_item, ['text'])) %}
{%- set c_5 -%}
{{ og_text(og_get(v_item, ['text'])) }}
{%- endset -%}
{{ include('compose/Text.html.twig', {'class': 'm-0 text-xs font-medium text-muted-foreground', 'children': c_5}, with_context = false) }}
{%- endif %}
{%- endset -%}
{{ include('compose/Box.html.twig', {'class': 'flex min-w-0 flex-1 flex-col gap-0', 'children': c_6}, with_context = false) }}
{%- endset -%}
{{ include('compose/ListItem.html.twig', {'class': 'relative flex min-w-0 gap-4 pb-4 last:pb-0', 'attrs': og_attrs(['data-event', og_get(v_item, ['id']), 'data-slot', 'timeline-item']), 'children': c_7}, with_context = false) }}
{%- endfor %}
{%- endset -%}
{{ include('compose/List.html.twig', {'class': 'm-0 flex list-none flex-col p-0', 'children': c_8}, with_context = false) }}
{%- endset -%}
{{ include('compose/Box.html.twig', {'class': og_s(og_cnv(['min-w-0', (p.className ?? '')])), 'attrs': og_attrs(['data-slot', 'timeline']), 'children': c_9}, with_context = false) }}
Point the CLI at this runtime once, then add the item:
npx ui8kit init --yes --framework latte --dir src --registry-url https://registry.buildy.tw/latte --strict-cdnnpx ui8kit add timeline{* Code generated by packages/kit-compose/src/server-organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT.
Source: packages/compose-gen/specs/parts/timeline.json
A vertical list of events (an order's history): a dot on a line, the title, an optional text and the time. Newest first or oldest first is the caller's order.
Props (p): items, className. *}
{var $k_TONE_DOT = ['gray' => 'bg-muted-foreground', 'green' => 'bg-emerald-500', 'blue' => 'bg-blue-500', 'amber' => 'bg-amber-500', 'red' => 'bg-red-500']}
{var $v_items = ($p['items'] ?? null)}
{capture $c_9}
{capture $c_8}
{foreach og_l($v_items) as $v_item}
{var $v_i = $iterator->counter0}
{capture $c_7}
{capture $c_1}
{if og_t(og_lt($v_i, og_sub(og_len($v_items), 1)))}
{=og_include('compose/Inline.latte', ['class' => 'absolute top-4 -bottom-0 w-px bg-border'])|noescape}
{/if}
{=og_include('compose/Inline.latte', ['class' => og_s(og_cnv(['mt-2 size-2 rounded-full', og_at($k_TONE_DOT, og_coalesce([og_get($v_item, ['tone']), 'gray']))]))])|noescape}
{/capture}
{=og_include('compose/Box.latte', ['class' => 'relative flex w-2 shrink-0 justify-center', 'children' => (string) $c_1])|noescape}
{capture $c_6}
{capture $c_4}
{capture $c_2}
{=og_text(og_get($v_item, ['title']))}
{/capture}
{=og_include('compose/Text.latte', ['class' => 'm-0 text-sm font-bold text-foreground', 'children' => (string) $c_2])|noescape}
{capture $c_3}
{=og_text(og_get($v_item, ['time']))}
{/capture}
{=og_include('compose/Text.latte', ['class' => 'm-0 shrink-0 text-xs font-medium text-muted-foreground', 'children' => (string) $c_3])|noescape}
{/capture}
{=og_include('compose/Box.latte', ['class' => 'flex flex-wrap items-baseline justify-between gap-x-4', 'children' => (string) $c_4])|noescape}
{if og_t(og_get($v_item, ['text']))}
{capture $c_5}
{=og_text(og_get($v_item, ['text']))}
{/capture}
{=og_include('compose/Text.latte', ['class' => 'm-0 text-xs font-medium text-muted-foreground', 'children' => (string) $c_5])|noescape}
{/if}
{/capture}
{=og_include('compose/Box.latte', ['class' => 'flex min-w-0 flex-1 flex-col gap-0', 'children' => (string) $c_6])|noescape}
{/capture}
{=og_include('compose/ListItem.latte', ['class' => 'relative flex min-w-0 gap-4 pb-4 last:pb-0', 'attrs' => og_attrs(['data-event', og_get($v_item, ['id']), 'data-slot', 'timeline-item']), 'children' => (string) $c_7])|noescape}
{/foreach}
{/capture}
{=og_include('compose/List.latte', ['class' => 'm-0 flex list-none flex-col p-0', 'children' => (string) $c_8])|noescape}
{/capture}
{=og_include('compose/Box.latte', ['class' => og_s(og_cnv(['min-w-0', ($p['className'] ?? '')])), 'attrs' => og_attrs(['data-slot', 'timeline']), 'children' => (string) $c_9])|noescape}
Point the CLI at this runtime once, then add the item:
npx ui8kit init --yes --framework jinja2 --dir src --registry-url https://registry.buildy.tw/jinja2 --strict-cdnnpx ui8kit add timeline{#- Code generated by packages/kit-compose/src/server-organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT.
Source: packages/compose-gen/specs/parts/timeline.json
A vertical list of events (an order's history): a dot on a line, the title, an optional text and the time. Newest first or oldest first is the caller's order.
Props (p): items, className. -#}
{%- set k_TONE_DOT = {'gray': 'bg-muted-foreground', 'green': 'bg-emerald-500', 'blue': 'bg-blue-500', 'amber': 'bg-amber-500', 'red': 'bg-red-500'} -%}
{%- set v_items = og_def(p['items'], none) -%}
{%- set c_9 -%}
{%- set c_8 -%}
{%- for v_item in og_l(v_items) %}
{%- set v_i = loop.index0 -%}
{%- set c_7 -%}
{%- set c_1 -%}
{%- if og_t(og_lt(v_i, og_sub(og_len(v_items), 1))) %}
{{ og_include('compose/inline.html.j2', {'p': {'Class': 'absolute top-4 -bottom-0 w-px bg-border'}}) }}
{%- endif %}
{{ og_include('compose/inline.html.j2', {'p': {'Class': og_s(og_cnv(['mt-2 size-2 rounded-full', og_at(k_TONE_DOT, og_coalesce([og_get(v_item, ['tone']), 'gray']))]))}}) }}
{%- endset -%}
{{ og_include('compose/box.html.j2', {'p': {'Class': 'relative flex w-2 shrink-0 justify-center'}, 'children': c_1}) }}
{%- set c_6 -%}
{%- set c_4 -%}
{%- set c_2 -%}
{{ og_text(og_get(v_item, ['title'])) }}
{%- endset -%}
{{ og_include('compose/text.html.j2', {'p': {'Class': 'm-0 text-sm font-bold text-foreground'}, 'children': c_2}) }}
{%- set c_3 -%}
{{ og_text(og_get(v_item, ['time'])) }}
{%- endset -%}
{{ og_include('compose/text.html.j2', {'p': {'Class': 'm-0 shrink-0 text-xs font-medium text-muted-foreground'}, 'children': c_3}) }}
{%- endset -%}
{{ og_include('compose/box.html.j2', {'p': {'Class': 'flex flex-wrap items-baseline justify-between gap-x-4'}, 'children': c_4}) }}
{%- if og_t(og_get(v_item, ['text'])) %}
{%- set c_5 -%}
{{ og_text(og_get(v_item, ['text'])) }}
{%- endset -%}
{{ og_include('compose/text.html.j2', {'p': {'Class': 'm-0 text-xs font-medium text-muted-foreground'}, 'children': c_5}) }}
{%- endif %}
{%- endset -%}
{{ og_include('compose/box.html.j2', {'p': {'Class': 'flex min-w-0 flex-1 flex-col gap-0'}, 'children': c_6}) }}
{%- endset -%}
{{ og_include('compose/list-item.html.j2', {'p': {'Class': 'relative flex min-w-0 gap-4 pb-4 last:pb-0', 'Attrs': og_attrs(['data-event', og_get(v_item, ['id']), 'data-slot', 'timeline-item'])}, 'children': c_7}) }}
{%- endfor %}
{%- endset -%}
{{ og_include('compose/list.html.j2', {'p': {'Class': 'm-0 flex list-none flex-col p-0'}, 'children': c_8}) }}
{%- endset -%}
{{ og_include('compose/box.html.j2', {'p': {'Class': og_s(og_cnv(['min-w-0', og_def(p['className'], '')])), 'Attrs': og_attrs(['data-slot', 'timeline'])}, 'children': c_9}) }}
Props
Names and types come from the xgen specs of the source. Standard HTML attributes (id, role, tabIndex, aria-*) pass through to the root element; the class prop is className in React.
A vertical list of events (an order's history): a dot on a line, the title, an optional text and the time. Newest first or oldest first is the caller's order.
| Prop | Type | Default | Description |
|---|---|---|---|
| items (required) | TimelineItem[] | - | tone is gray, green, blue, amber or red |