TimelineComponent
represents the react Timeline Component.
<TimelineComponent items={timelineItems} />
string
| TimelineAlign
Defines the alignment of item content within the Timeline. The possible values are:
import { render } from "react-dom";
import "./index.css";
import * as React from "react";
import { TimelineComponent, ItemModel } from '@syncfusion/ej2-react-layouts';
import { SampleBase } from "./sample-base";
export class Default extends SampleBase<{}, {}> {
public textContent: ItemModel[] = [
{ content: 'Cart' },
{ content: 'Personal Info' },
{ content: 'Delivery Address' },
{ content: 'Payment' }
];
render() {
return (
<div>
<TimelineComponent id="timeline" items={this.textContent} align="before"></TimelineComponent>
</div>
);
}
}
render(<Default />, document.getElementById("sample"));
Defaults to TimelineAlign.After
string
Defines the CSS class to customize the Timeline appearance.
Defaults to ”
boolean
Enable or disable persisting component’s state between page reloads.
Defaults to false
boolean
Enable or disable rendering component in right to left direction.
Defaults to false
Defines the list of items.
Defaults to []
string
Overrides the global culture and localization value for this component. Default global culture is ‘en-US’.
Defaults to ”
string
| TimelineOrientation
Defines the orientation type of the Timeline. The possible values are:
import { render } from "react-dom";
import "./index.css";
import * as React from "react";
import { TimelineComponent, ItemModel } from '@syncfusion/ej2-react-layouts';
import { SampleBase } from "./sample-base";
export class Default extends SampleBase<{}, {}> {
render() {
return (
<div>
<TimelineComponent id="timeline" items={[{}, {}, {}, {}]} orientation="horizontal"></TimelineComponent>
</div>
);
}
}
render(<Default />, document.getElementById("sample"));
Defaults to TimelineOrientation.Vertical
boolean
Defines whether to show the timeline items in reverse order or not.
Defaults to false
string
| function
| JSX.Element
Defines the template content for each timeline item. The template context will contain the item model.
import { render } from "react-dom";
import "./index.css";
import * as React from "react";
import { TimelineComponent, ItemModel } from '@syncfusion/ej2-react-layouts';
import { SampleBase } from "./sample-base";
export class Default extends SampleBase<{}, {}> {
render() {
return (
<div>
<TimelineComponent id="timeline" items={[{}, {}, {}, {}]} template='<span>${currentItem}</span>'></TimelineComponent>
</div>
);
}
}
render(<Default />, document.getElementById("sample"));
Defaults to ”
EmitType<TimelineRenderingEventArgs>
Event triggers before rendering each item.
EmitType<Event>
Event callback that is raised after rendering the timeline.