1.0.8 • Published 9 months ago

react-modern-timeline v1.0.8

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

react-modern-timeline

React component to create responsive modern event timeline

react-modern-timeline screenshot

Features

  • Lightweight
  • Responsive
  • Customizable

Getting started

Install the package with npm or yarn

npm install react-modern-timeline

yarn add react-modern-timeline

Usage

The following snippet generates the timeline you see in the screenshot:

import { ReactModernTimeline, TimelineEvent } from './ReactModernTimeline';

function App() {
  return (
    <div className="App">
      <ReactModernTimeline>
        <TimelineEvent
          title="Event timeline for react"
          content="Lorem ipsum dolor sit amet"
          date="27, Nov 2023 at 09:30 AM"
        />
        <TimelineEvent
          title="Event with image"
          content="Lorem ipsum dolor sit amet"
          date="27, Nov 2023 at 09:30 AM"
          image="https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/Sydney_Opera_House_-_Dec_2008.jpg/800px-Sydney_Opera_House_-_Dec_2008.jpg"
          iconColor="limegreen"
        />
        <TimelineEvent
          title="Event timeline heading"
          content="Lorem ipsum dolor sit amet"
          date="27, Nov 2023 at 09:30 AM"
        />
      </div>
    </div>
  );
}

export default App;

Props

ReactModernTimeline

Wrapper component that creates the infinite vertical timeline

NameTypeDescription
titleStyleobjectOvveride inline styles of event title
contentStyleobjectOverride inline styles of event content
containerStyleobjectOverride inline styles of event container
iconContainerStyleobjectOverride inline styles of icon container

TimelineEvent

Every element of the timeline will be represented by the TimelineEvent component.

NameTypeDescription
titlestringTitle of the event
contentstringContent or description of the event
datestringDate of the event (auto-formatting for supported for now)
imagestringCustom CSS styling for the icon
iconColorstringOverride style for the entire event container

Contributing and Bug reporting

Visit GitHub.

License

MIT

1.0.8

9 months ago

1.0.7

9 months ago

1.0.6

9 months ago

1.0.5

9 months ago

1.0.4

9 months ago

1.0.3

9 months ago

1.0.2

9 months ago

1.0.1

9 months ago

1.0.0

9 months ago