Timeline
Server ComponentVertical activity feed with dots, connectors, timestamps and descriptions.
Import
import { Timeline, TimelineItem, TimelineDot, TimelineContent, TimelineTitle, TimelineTime, TimelineDescription } from "@cronus-ui/ui";
npx cronus-ui add timeline
Examples
.cronus
The same component declared in Cronus. Emitted at build time from the audit fixtures — the kernel renders it as HTML with no React.
default.cronus
app "audit-fixtures" {
port 5176
}
style {
preset aurora
theme dark
}
component TimelineDefault layout:inline style:timeline {
aria-label:"Order history"
label "Order history"
text "Order placed"
text "Order shipped"
}
page "/audit/timeline/default" type:custom {
use TimelineDefault
}
API Reference
Generated from the component's exported types.
TimelineItemProps
Extends LiHTMLAttributes<HTMLLIElement>
| Prop | Type | Default | Description |
|---|---|---|---|
connector | boolean | true | Render the trailing connector line below this item's dot. Defaults to `true`; the rail draws a line down to the next event. Set `false` on the final item so the rail stops at its dot (auto-detected when the item is the last child of a , so this is rarely needed by hand). |
children | ReactNode | — | Contents of the component. |
className | string | — | Additional class names merged onto the root. |
TimelineDotProps
Extends Omit<HTMLAttributes<HTMLSpanElement>, "color">, Omit<VariantProps<typeof timelineDotVariants>, "withIcon">
| Prop | Type | Default | Description |
|---|---|---|---|
icon | ReactNode | — | Optional glyph (e.g. a `lucide-react` icon) rendered inside the dot. When present the dot becomes a ring-bordered chip sized to hold it; otherwise it is a small solid disc. |
asChild | boolean | — | Render as the child element via Slot. |
children | ReactNode | — | Contents of the component. |
className | string | — | Additional class names merged onto the root. |
id | string | — | DOM id of the root element. |
TimelineProps
Extends OlHTMLAttributes<HTMLOListElement>
| Prop | Type | Default | Description |
|---|---|---|---|
children | ReactNode | — | Contents of the component. |
className | string | — | Additional class names merged onto the root. |
start | number | — | — |
TimelineConnectorProps
Extends HTMLAttributes<HTMLDivElement>
| Prop | Type | Default | Description |
|---|---|---|---|
className | string | — | Additional class names merged onto the root. |
children | ReactNode | — | Contents of the component. |
id | string | — | DOM id of the root element. |
TimelineContentProps
Extends HTMLAttributes<HTMLDivElement>
| Prop | Type | Default | Description |
|---|---|---|---|
className | string | — | Additional class names merged onto the root. |
children | ReactNode | — | Contents of the component. |
id | string | — | DOM id of the root element. |
TimelineTitleProps
Extends HTMLAttributes<HTMLDivElement>
| Prop | Type | Default | Description |
|---|---|---|---|
className | string | — | Additional class names merged onto the root. |
children | ReactNode | — | Contents of the component. |
id | string | — | DOM id of the root element. |
TimelineTimeProps
Extends TimeHTMLAttributes<HTMLTimeElement>
| Prop | Type | Default | Description |
|---|---|---|---|
children | ReactNode | — | Contents of the component. |
className | string | — | Additional class names merged onto the root. |
dateTime | string | — | Machine-readable datetime. |
TimelineDescriptionProps
Extends HTMLAttributes<HTMLDivElement>
| Prop | Type | Default | Description |
|---|---|---|---|
className | string | — | Additional class names merged onto the root. |
children | ReactNode | — | Contents of the component. |
id | string | — | DOM id of the root element. |