cshsh / vue-cute-timeline

A cute timeline component for Vue.js.

Home Page:https://vue-cute-timeline.netlify.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

vue-cute-timeline

NPM version NPM downloads CircleCI

DEMO

Introduction

A cute timeline component for Vue.js.

Install

yarn add vue-cute-timeline --save

Usage

<template>
  <timeline>
    <timeline-title>title</timeline-title>
    <timeline-item color="#9dd8e0">item1</timeline-item>
    <timeline-item :hollow="true">item2</timeline-item>
  </timeline>
</template>

<script>
import { Timeline, TimelineItem, TimelineTitle } from 'vue-cute-timeline'

export default {
  components: {
    Timeline,
    TimelineItem,
    TimelineTitle
  }
}
</script>

API

<timeline> props

It will be better to use hyphenated attributes instead of camelcase attributes. The discussion explained why.

  • timeline-theme

    The theme color of the timeline component.

    Set the line's and circle's color.

    Type: string
    Default: #dbdde0
    

<timeline-item> / <timeline-title> props

  • color

    Set the circle's and the circle's border color.

    Type: string
    Default: #dbdde0
    
  • line-color

    Set only the circle's border color.

    Type: string
    Default: #dbdde0
    
  • hollow

    Control whether the circle is hollow or not.

    Type: boolean
    Default: false
    

Slots

  • others

    Don't like the circle? You can set it to a image, iconfont or anything you want.

    <timeline-item>
      <img
          src="https://user-images.githubusercontent.com/12069729/36057805-80cfc3d2-0e4e-11e8-8851-6fda091ff389.png"
          class="icon-heart"
          slot="others"
      />
    </timeline-item>

License

MIT © luyilin

minemine.cc · GitHub @luyilin · Twitter @luyilin12

About

A cute timeline component for Vue.js.

https://vue-cute-timeline.netlify.com/

License:MIT License


Languages

Language:Vue 89.6%Language:JavaScript 10.4%