Svelte components for creating a vertical timeline.
Check out the demo.
yarn add svelte-vertical-timeline
or
npm install svelte-vertical-timeline
A timeline consists of components below.
<Timeline/>
<TimelineItem/>
<TimelineSeparator/>
<TimelineDot/>
<TimelineConnector/>
<TimelineContent/>
<TimelineOppositeContent/>
I listed some examples of timelines you can create with this library below.
A basic timeline showing list of events.
```svelte
{option.title}
The main content of the timeline can be positioned on the left side.
```svelte
{option.title}
The timeline can display the events on alternating sides.
```svelte
{option.title}
The timeline can display content on opposite sides.
Please make sure to add slot="opposite-content"
to the <TimelineOppositeContent/>
component.
```svelte
{option.time}{option.title}
You can customize the timeline anyway you want. Check here for furthur information.
```svelte
09:30 am You need to eat. 10:30 am You need to take a nap. 11:00 am Svelte is Awesome. 01:00 am You need to treat yourself.Eat
Sleep
Code
Snack
<Timeline/>
Name | type | isRequired | Description |
---|---|---|---|
position | right , left or alternate |
x | The position where the TimelineContent should appear |
style | string | x | Custom style for this component |
<TimelineItem/>
Name | type | isRequired | Description |
---|---|---|---|
position | right or left |
x | The position where the timeline's item should appear |
style | string | x | Custom style for this component |
<TimelineSeparator/>
Name | type | isRequired | Description |
---|---|---|---|
style | string | x | Custom style for this component |
<TimelineDot/>
Name | type | isRequired | Description |
---|---|---|---|
style | string | x | Custom style for this component |
<TimelineConnector/>
Name | type | isRequired | Description |
---|---|---|---|
style | string | x | Custom style for this component |
<TimelineContent/>
Name | type | isRequired | Description |
---|---|---|---|
style | string | x | Custom style for this component |
<TimelineOppositeContent/>
Name | type | isRequired | Description |
---|---|---|---|
style | string | x | Custom style for this component |