1.1.2 • Published 4 years ago

react-customizable-timeline v1.1.2

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

React-Customizable-Timeline

PRs Welcome code style: prettier Issues license

React-Customizable-Timeline is a simple yet fully customizable component that allows you to create a timeline with almost zero effort.

Getting Started

$ npm i react-customizable-timeline

You might also need to install peer dependencies

$ npm i styled-components react-awesome-reveal react-spring

How to use

First thing first, check out this DEMO!

Step 1: Import the component

import Timeline from 'react-customizable-timeline';

Step 2: Use it in your amazing application! For example:

<Timeline
  data={data}
  primaryDarkColor="black"
  primaryLightColor="white"
  titleShape="circle"
  dotShape="diamond"
  lineStyle="dotted"
  primaryFont="monospace"
  animation={true}
  stickyTitlePositioning={true}
/>

Configuration

Data Format

Data is an array of objects and the format MUST be like this:

const data = [
  {
    title: 'TITLE 1',
    events: [
      {
        title: 'EVENT TITLE',
        subtitle: 'EVENT SUBTITLE',
        content: 'CONTENT',
        location: 'LOCATION',
        label: '#LABLE1 #LABLE2',
        img: {
          url:
            'https://images.unsplash.com/photo-1600790078201-5490baf711d6?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=500&q=60',
          alt: 'pic',
        },
      },
    ],
  },
];

Please note that besides events[title], everything is optional!

Component Settings

PropertyTypeRequiredDefaultOptions
animationBooleanOptionaltruetrue/false
primaryDarkColorStringOptional#625261
primaryLightColorStringOptional#F5F5DC
primaryFontStringOptional'Chivo', sans-serif
titleShapeStringOptionalcirclecircle/square/rectangular/diamond
dotShapeStringOptionalcirclecircle/square/line/diamond
lineStyleStringOptionaldottedsolid/dotted/dashed/hidden
stickyTitlePositioningBooleanOptionaltruetrue/false

Contributing

To contribue please read the CONTRIBUTING.md

Author

Contributors

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

1.1.2

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.9

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago