npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

react-timeline-events

v1.0.4

Published

This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).

Downloads

15

Readme

react-timeline-events

This project was bootstrapped with Create React App.

Easily add a timeline component to your existing react application.

Checkout the demo site

react-timeline-events_1

react-timeline-events_1

Install

npm install react-timeline-events

Usage

import Timeline from 'react-timeline-events';

...

<Timeline
    headerTitle='Social media in the last decade'
    data={data}
    showMemories={false}
    renderHeader={true}
    headerStyles={{
        // provide your custom styles
        background: 'linear-gradient(to right, #E91E63 0%, #673AB7 100%)',
        color: 'white',
        minHeight: '65vh',
        borderBottom: '2px dotted #fff'
    }}
    textStyles={{
        color: 'white',
        fontSize: '5rem'
    }}
    timelineStyles={{
        background: 'linear-gradient(to right, #673AB7 0%, #E91E63 100%)'
    }}
/>

Timeline props

    headerTitle: string;
    Provide a header text to be rendered (optional)

    data: Array<TimelineEventObject>;
    Array of timeline event object thats contains events and memories

    Example data array:

    [
        {
           events: [
             {
               title: "2010",
               description: "",
               date: "",
               image: ""
             },
             {
               title: "Instagram",
               description: "Instagram launches on iOS making it the first mobile-only social network",
               date: "",
               image: "https://en.instagram-brand.com/wp-content/uploads/2016/11/Glyph-Icon-hero.png"
             },
           ],
           memories: [
             {
               source: "https://en.instagram-brand.com/wp-content/uploads/2016/11/Glyph-Icon-hero.png",
               type: "big",
               title: 'test'
             },
           ]
        },
    ]

    showMemories?: boolean;
    Optional configuration to either show or hide memories (images) for a event (default: false)

    renderHeader?: boolean;
    Optional configuration to either show or hide header component (default: false)

    headerStyles?: CSSProperties;
    Optional header styles configuration that allows to add additional styles to the header component (default: false)

    textStyles?: CSSProperties;
    Optional text styles configuration that allows to add additional styles to the header text (default: false)

    timelineStyles?: CSSProperties;
    Optional timeline styles configuration that allows to add additional styles to the timeline (default: false)

TimelineEventObject props

    events: Array<Event>;
    Array of events object

    memories: Array<Memory>;
    Array of memory object

Header props

    title?: string;
    Header title
    
    headerStyles?: CSSProperties;
    Optional header styles configuration that allows to add additional styles to the header component (default: false)
    
    textStyles?: CSSProperties;
    Optional text styles configuration that allows to add additional styles to the header text (default: false)
}

Event props

    title: string;
    Event title

    description: string;
    Event description

    date: string;
    Event date

    image: string;
    Image source

Memory props

    title: string;
    Memory title

    source: string;
    Image source

    type: string;
    Image type, one of big, horizontal or vertical