Socket
Socket
Sign inDemoInstall

react-events-timeline

Package Overview
Dependencies
9
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    react-events-timeline

The package that will help you display your content as a vertical timeline


Version published
Weekly downloads
12
increased by300%
Maintainers
1
Install size
186 kB
Created
Weekly downloads
 

Readme

Source

react-events-timeline

Version Build Coverage Minified size Downloads Dependabot PRs Welcome Tested with jest

Table of contents

Installation

You need to install package:

npm install react-events-timeline

You can use yarn:

yarn add react-events-timeline

Getting started

You should import the component and css file:

import EventsTimeline from 'react-events-timeline';
import 'react-events-timeline/dist/main.css';

Then use the component in your application. For example:

<EventsTimeline title='HISTORY' icon={icon} color='blue' data={data} />

The settings of the component

ParameterRequiredTypeDescriptionDefault
coloroptionalstringThe component supports 3 color versions blue, green and orangecolor: '#333'
iconoptionaljsxYou can present the icon in any form as a JSX. For example, using an icon font such as font-awesome: <i className='fa fa-briefcase'/>By default the icon will not be displayed with the title
titleoptionalstringSets the name of the timeline next to the iconBy default the title will not be displayed
datarequiredarraySee the description of Data item parameters

Data item parameters

Data is an array containing objects. For example:

const data = [
{
    date: 2019,
    title: 'Senior Developer',
    label: 'GitHub',
    location: 'Palo Alto, California (USA)',
    content: (<div>
      Description
    </div>),
},
...OtherObjects
]
ParameterRequiredTypeDescription
daterequiredstringDate for item output. It can be YYYY,MM.YY,DD.MM or any other configuration.
contentrequiredjsxYour content for item
titleoptionalstringThe title of the item
labeloptionalstringLabel is the text that will be highlighted in color
locationoptionalstringLocation designation

Example

import EventsTimeline from 'react-events-timeline';
import 'react-events-timeline/dist/main.css';

const data = [
{
    date: 2019,
    title: 'Senior Developer',
    label: 'GitHub',
    location: 'Palo Alto, California (USA)',
    content: (<div>Description</div>),
}];
const icon = <i className='fa fa-briefcase'/>;

const App = () => (
  <div className="app">
    ...
    <EventsTimeline title='WORK HISTORY' icon={icon} color='blue' data={data} />
  </div>
);
export default App;

Keywords

FAQs

Last updated on 19 Apr 2020

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc