• Stars
    star
    121
  • Rank 292,203 (Top 6 %)
  • Language Vue
  • License
    MIT License
  • Created about 6 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Minimalist Timeline ⏳ with VueJS 💚

Timeline Vuejs

npm downloads Twitter

Demo Timeline Vue

📦 Install

npm install timeline-vuejs --save
// main.js
import '../node_modules/timeline-vuejs/dist/timeline-vuejs.css'
// component.vue
<script>
  import Timeline from 'timeline-vuejs'

  export default {
    // ...
    components: {
      Timeline
    }
    // ...
  }
</script>

🔧 Usage

<template>
  <Timeline
    :timeline-items="timelineItems"
    :message-when-no-items="messageWhenNoItems"/>
</template>

<script>
import Timeline from 'timeline-vuejs'

export default {
  components: {
    Timeline
  }
  data: () => ({
    messageWhenNoItems: 'There are not items',
    timelineItems: [
      {
        from: new Date(2018, 7),
        title: 'Name',
        description:
          'Lorem ipsum dolor sit amet consectetur adipisicing elit. Eius earum architecto dolor, vitae magnam voluptate accusantium assumenda numquam error mollitia, officia facere consequuntur reprehenderit cum voluptates, ea tempore beatae unde.'
      },
      {
        from: new Date(2016, 1),
        title: 'Name',
        description:
          'Lorem ipsum dolor sit amet consectetur adipisicing elit. Eius earum architecto dolor, vitae magnam voluptate accusantium assumenda numquam error mollitia, officia facere consequuntur reprehenderit cum voluptates, ea tempore beatae unde.'
      },
      {
        from: new Date(2016, 6),
        title: 'Name',
        description:
          'Lorem ipsum dolor sit amet consectetur adipisicing elit. Eius earum architecto dolor, vitae magnam voluptate accusantium assumenda numquam error mollitia, officia facere consequuntur reprehenderit cum voluptates, ea tempore beatae unde.'
      },
      {
        from: new Date(2012, 1),
        title: 'Name',
        description:
          'Lorem ipsum dolor sit amet consectetur adipisicing elit. Eius earum architecto dolor, vitae magnam voluptate accusantium assumenda numquam error mollitia, officia facere consequuntur reprehenderit cum voluptates, ea tempore beatae unde.'
      }
    ]
  })
}
</script>

Available props

Props Type Default Description
timelineItems Array [ ] Items value of the timeline
messageWhenNoItems String Message when there are no items
colorDots String #2da1bf Color of the dots
uniqueTimeline Boolean false If true, the timeline isn't separated
uniqueYear Boolean false If true, the timeline isn't separated when is the same year
order String (desc or asc) Type of order
dateLocale String Locale of the browser Type of locale, for example 'en-US'

Example with order

<template>
  <Timeline
    :timeline-items="timelineItems"
    :message-when-no-items="messageWhenNoItems"
    order="desc"/>
</template>
...

Example with unique year

<template>
  <Timeline
    :timeline-items="timelineItems"
    :message-when-no-items="messageWhenNoItems"
    :unique-year="true"
    order="asc"/>
</template>
...

Example with day and month on title

If you want to show day and month on specific items, send true on prop showDayAndMonth

<script>
export default {
  data: () => ({
    timelineItems: [
      {
        from: new Date(2017, 5, 2),
        title: 'Name',
        description: 'Lorem ipsum dolor sit amet consectetur adipisicing elit.',
        showDayAndMonth: true
      },
      {
        from: new Date(2017, 8, 9),
        title: 'Name',
        description: 'Lorem ipsum dolor sit amet consectetur adipisicing elit.'
      }
    ]
  })
}
</script>

Example with diferent colors

<script>
export default {
  data: () => ({
    timelineItems: [
      {
        from: new Date(2017, 5, 2),
        title: 'Name',
        description: 'Lorem ipsum dolor sit amet consectetur adipisicing elit.',
        color: '#e74c3c'
      },
      {
        from: new Date(2017, 8, 9),
        title: 'Name',
        description: 'Lorem ipsum dolor sit amet consectetur adipisicing elit.',
        color: '#2ecc71',
      }
    ]
  })
}
</script>

License

timeline-vuejs © Pablo Sirera, released under the MIT License.
Authored and maintained by Pablo Sirera with help from contributors.

pablosirera.com · GitHub Pablo Sirera · Twitter @pablosirera

More Repositories

1

resources

A resources list that I use and I like
JavaScript
16
star
2

pablosirera.com

My portfolio ✌️
Vue
14
star
3

devmind

🤓 App for courses management by lists
Vue
10
star
4

github-ranking

🚀 Create your github contribution ranking
Vue
8
star
5

tracking-plants

🌲 App for tracking your plants 🍀
Vue
6
star
6

pablosirera

My description on Github profile ✌️
JavaScript
5
star
7

vue-i18n-example

Example repository with basic configuration from i18n, vue3 and vitejs.
Vue
3
star
8

recipes-notion

App for seeing my recipes from Notion.
Vue
3
star
9

youtube-clon

Youtube Clon with Vue3 and Vite
Vue
3
star
10

meme-vue-app

Meme search app with Vue 3
Vue
2
star
11

to-do-vuejs

Simple To Do with VueJS
CSS
2
star
12

comparative-between-frameworks

Comparative between frameworks frontend
2
star
13

old-pablosirera

💼 My portfolio
Vue
2
star
14

My-Learning-Tracker

Learning tracker about my knowledge
2
star
15

vue-reactivity-examples

Vue
2
star
16

vue3-counter-basic

Basic counter with vue 3
Vue
2
star
17

primeros-pasos-nuxtjs-news

Aplicación de ejemplo de un sitio estático generado con NuxtJS, usando Nuxt Content como Headless CMS y Netlify como Hosting.
Vue
2
star
18

seed-vue-i18n

Seed with configuration of vue-18n
Vue
2
star
19

nuxt3-cocktails

Cocktails🍹 list with Nuxtjs v3
Vue
2
star
20

moneytory

Vue
1
star
21

vue-shopping-cart

Shopping Cart with Vue 2
Vue
1
star
22

scaffolding-vue

Example of scaffolding for vue 💚 project
JavaScript
1
star
23

github-actions-playground

1
star
24

food-guide

Vue
1
star
25

vue-videos-garaje-ideas

Repositorio con información sobre los videos de Vuejs del canal de Garaje de Ideas
1
star
26

my-components

💅 Application for centralize my components with storybook
JavaScript
1
star
27

weekly-menu

Vue
1
star
28

product-values

Vue
1
star
29

vue-template-syntax-examples

Repo to compare Options API vs Composition API on Vue 3
Vue
1
star
30

hacktoberfest-historic

Astro
1
star
31

overlay-obs

Aplicación con Vue3 para usar overlays en los directos de Twitch
Vue
1
star
32

who-reviews

WIP: Application for who reviews 🔎 pull request
JavaScript
1
star