TimelineComponent
1 Oct 20253 minutes to read
Represents the Essential JS 2 VueJS Timeline Component.
<ejs-timeline :items='timelineItems'></ejs-timeline>Properties
align string|TimelineAlign
Defines the alignment of item content within the Timeline.
The possible values are:
- Before
- After
- Alternate
- AlternateReverse
<template>
<ejs-timeline id="timeline" :items="textContent" align="before"></ejs-timeline>
</template>
<script>
import Vue from "vue";
import { TimelinePlugin } from "@syncfusion/ej2-vue-layouts";
Vue.use(TimelinePlugin);
export default Vue.extend({
data: function() {
return {
textContent: [
{ content: 'Cart' },
{ content: 'Personal Info' },
{ content: 'Delivery Address' },
{ content: 'Payment' }
]
};
}
});
</script>Defaults to TimelineAlign.After
cssClass string
Defines the CSS class to customize the Timeline appearance.
Defaults to ’’
enablePersistence boolean
Enable or disable persisting component’s state between page reloads.
Defaults to false
enableRtl boolean
Enable or disable rendering component in right to left direction.
Defaults to false
items TimelineItemModel[]
Defines the list of items.
Defaults to []
locale string
Overrides the global culture and localization value for this component. Default global culture is ‘en-US’.
Defaults to ’’
orientation string|TimelineOrientation
Defines the orientation type of the Timeline.
The possible values are:
- Horizontal
- vertical
<template>
<ejs-timeline id="timeline" :items="items" orientation="horizontal"></ejs-timeline>
</template>
<script>
import Vue from "vue";
import { TimelinePlugin } from "@syncfusion/ej2-vue-layouts";
Vue.use(TimelinePlugin);
export default Vue.extend({
data: function() {
return { items: [{}, {}, {}, {}] };
}
});
</script>Defaults to TimelineOrientation.Vertical
reverse boolean
Defines whether to show the timeline items in reverse order or not.
Defaults to false
template string|function
Defines the template content for each timeline item. The template context will contain the item model.
<template>
<ejs-timeline id="timeline" :items="items" :template="template"></ejs-timeline>
</template>
<script>
import Vue from "vue";
import { TimelinePlugin } from "@syncfusion/ej2-vue-layouts";
Vue.use(TimelinePlugin);
export default Vue.extend({
data: function() {
return {
items: [{}, {}, {}, {}],
template: '<span>${currentItem}</span>'
};
}
});
</script>Defaults to ’’
Events
beforeItemRender EmitType<TimelineRenderingEventArgs>
Event triggers before rendering each item.
created EmitType<Event>
Event callback that is raised after rendering the timeline.