0.2.1 • Published 4 years ago

vue-next-timeline v0.2.1

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

A simple component to display a timeline in horizontal format with Vue3.

Status

Version js-standard-style Downloads Dependencies

Demo

How to install

npm

npm install vue-next-timeline --save

Quick start

Globally

You can import in your main.js file

import App from './App.vue'
import { createApp } from 'vue'
import VueNextTimeline from 'vue-next-timeline'

const app = createApp(App)
app.component(VueNextTimeline)

Locally in any component

import VueNextTimeline from 'vue-next-timeline'

export default {
  components: {
    VueNextTimeline
  }
};

Basic usage

<template>
  <vue-next-timeline :items="items" />
</template>

<script>
  export default {
    data() {
      const item1 =  {
        title: '2013',
        content: 'The international year of mathematics on planet Earth. The international year of mathematics on planet Earth',
        color: '#2785ab'
      }
      const item2 = {
        title: '2014',
        content: 'International Year of Family Farming',
        color: '#f89714'
      }
      const item3 = {
        title: '2015',
        content: 'International Year of Light and Light-Based Technologies',
        color: '#f65b78'
      }
      const items = [item1, item2, item3]

      return { items }
    }
  };
</script>

Props

Property nameTypeDefaultDescription
itemsArray[]Array of objects to be displayed. Must have at least a content property
item-unique-keyStringnullKey with unique value of each item in the array. Used for the v-for Key
item-title-keyString'title'Key to display the item title
item-content-keyString'content'Key to display the contents of the item
item-clickableBooleantrueIndicates if the title or content can be clicked to launch a $emit event with the clicked element
min-widthString'700px'Minimum width of the upper div of the component
max-widthString'1220px'Maximum width of the upper div of the component
min-width-itemString'200px'Minimum width of each item
max-width-itemString'400px'Maximum width of each item
text-alignString'center'Alignment of item content and title
class-nameString''Class to be used for custom styles

Development

contributions welcome

Note: Contributions are very welcomed, however is very important to open a new issue using the issue template before you start working on anything, so we can discuss it before hand

Fork the project and enter this commands in your terminal

git clone https://github.com/cristianpoleyJS/vue-next-timeline.git
cd vue-next-timeline
npm install
npm run serve

Commitlint

This project follows the commitlint guidelines, with minor changes.

Contribute 🍺

License

MIT © cristianpoleyJS

0.2.1

4 years ago

0.2.0

4 years ago

0.1.1-alpha1

4 years ago

0.1.0

4 years ago

0.0.2-alpha.8

4 years ago

0.0.2-beta.1

4 years ago

0.0.2-alpha.7

4 years ago

0.0.2-alpha.2

4 years ago

0.0.2-alpha.1

4 years ago

0.0.2-alpha.4

4 years ago

0.0.2-alpha.3

4 years ago

0.0.2-alpha.6

4 years ago

0.0.2-alpha.5

4 years ago

0.0.1-alpha2

4 years ago

0.0.1-alpha1

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago