All Projects → Proskynete → vertical-timeline-component-react

Proskynete / vertical-timeline-component-react

Licence: GPL-3.0 License
A Timeline Component for React.js

Programming Languages

javascript
184084 projects - #8 most used programming language
typescript
32286 projects

Projects that are alternatives of or similar to vertical-timeline-component-react

React Chrono
🕜 Modern Timeline component for React
Stars: ✭ 2,873 (+6740.48%)
Mutual labels:  timeline, timeline-component, vertical-timeline
notifyme
react-notification-timeline is a react based component helps in managing the notification in time-based manner.
Stars: ✭ 94 (+123.81%)
Mutual labels:  timeline, timeline-component
react-timeline
The easiest way to add a responsive and customizable timeline to React apps
Stars: ✭ 68 (+61.9%)
Mutual labels:  timeline, timeline-component
react-native-beautiful-timeline
Fully customizable, beautifully designed Timeline for React Native.
Stars: ✭ 111 (+164.29%)
Mutual labels:  timeline, timeline-component
vue-light-timeline
A mobile first lightweight vue timeline components
Stars: ✭ 88 (+109.52%)
Mutual labels:  timeline, timeline-component
react-universal-starter
React@16, react-router@4, redux and webpack@4 starter project
Stars: ✭ 44 (+4.76%)
Mutual labels:  styled-components
styled-units
You might want to try https://github.com/donavon/styled-shortcuts instead
Stars: ✭ 14 (-66.67%)
Mutual labels:  styled-components
bitcoin-development-history
Data and a example for a open source timeline of the history of Bitcoin development
Stars: ✭ 27 (-35.71%)
Mutual labels:  timeline
paygreen-ui
UI PayGreen Components: React, Styled Component
Stars: ✭ 29 (-30.95%)
Mutual labels:  styled-components
gbkel-portfolio
💎 My personal website that's mainly powered by Next.js, my own style guide and a lot of other technologies.
Stars: ✭ 12 (-71.43%)
Mutual labels:  styled-components
styled-native-polished
Styled Components helpers for React Native
Stars: ✭ 21 (-50%)
Mutual labels:  styled-components
minesweeper
💣Minesweeper game written with React
Stars: ✭ 18 (-57.14%)
Mutual labels:  styled-components
styled-components-docs-zh
💅 styled-components 中文文档翻译 🏇持续施工中
Stars: ✭ 160 (+280.95%)
Mutual labels:  styled-components
react-component-library-lerna
Build your own React component library managed with lerna, presented with storybook and published in private npm registry.
Stars: ✭ 55 (+30.95%)
Mutual labels:  styled-components
react-awesome-notifications
A beautiful fully customizable React + Redux notification system built with styled-components
Stars: ✭ 29 (-30.95%)
Mutual labels:  styled-components
netflix landing-page
The Netflix.com landing page built via React 16 and Styled-Components. Build deployed via Surge.sh for preview.
Stars: ✭ 39 (-7.14%)
Mutual labels:  styled-components
smores-react
🍭 Marshmallow React components
Stars: ✭ 34 (-19.05%)
Mutual labels:  styled-components
desvg
🌅 Converts SVG files into components 🌞
Stars: ✭ 79 (+88.1%)
Mutual labels:  styled-components
thewhite
✒️ It's a minimal and light wordpress blog theme 🎨
Stars: ✭ 87 (+107.14%)
Mutual labels:  timeline
medly-components
🧩 Medly components provides numerous themable react components, each with multiple varitaions of sizes, colors, position etc.
Stars: ✭ 66 (+57.14%)
Mutual labels:  styled-components

vertical-timeline-component-react

A simple component to generate a responsive vertical timeline

Vertical Timeline Component React

Status

Coverage Status Version Build Status GitHub issues GitHub forks GitHub stars GitHub license Package Quality PRs welcome CodeSandbox



Table of contents
  1. Getting started
  2. API Documentation
  3. How to use it
  4. Contributors

Getting started

To install as npm dependency
npm install --save vertical-timeline-component-react

🔝

API Documentation

Timeline

This is the wrapper component that creates the vertical timeline.

  • Childrens
Number of children Required Value Allowed
Many At least the first Container component is required Only Container components
  • Props
name Type Required Values Allowed default values Description
theme object false colors { yearColor: "#888888", lineColor: "#c5c5c5", dotColor: "#c5c5c5", borderDotColor: "#ffffff", titleColor: "#cccccc", subtitleColor: "#888888", textColor: "#cccccc" } Set colors in all components
lang string false en, es, de, tr or zh_CN en Change the language from and to texts and change the format in the dates
dateFormat string false only-number, short, with-weekday or full only-number Change the presentation format of dates

dateFormat: Receive only one of four options (The options are same the moment.js using)

only-number short with-weekday full
English (en) MM/D/YYYY MMM DD, YYYY ddd, MMM DD, YYYY dddd, MMMM DD, YYYY
Spanish (es) D/MM/YYYY DD MMM YYYY ddd, DD [de] MMM YYYY dddd, DD [de] MMMM [de] YYYY
German (de) D.MM.YYYY DD.MMM.YYYY ddd., DD. MMM. YYYY dddd, DD. MMMM YYYY
Turk (tr) DD.MM.YYYY DD MMM YYYY DD MMM YYYY ddd DD MMMM YYYY dddd
Simplified Chinese (zh_CN) YYYY/MM/D YYYY年MM月DD日 YYYY年MMM月DD日 YYYY年MM月DD日dddd

🔝

Container

Each event in the timeline will be represented by the Content component. This component receive only two children's, the first is YearContent and the second is BodyContent. There can be multiple repeating instances of this component inside Timeline wrapper.

  • Childrens
Number of children Required Value Allowed
2 true YearContent and BodyContent

🔝

YearContent

For each Container you need YearContent (like first children) since with this component you mark the events in the given year.

  • Props
Name Type Required Values Allowed default values Description
startDate string true YYYY/MM/DD - YYYY/MM - YYYY does not apply The date of the start of the content or contents
endDate string false YYYY/MM/DD - YYYY/MM - YYYY does not apply The date of the end of the content or contents
currentYear boolean false true or false current year The value is the current year, it is recommended to use it in the last Container

🔝

BodyContent

For each Container you need ContentBody (like second children). This component will be the container of the one or more Sections.

  • Childrens
Number of children Required Value Allowed
Many At least the first Section component is required Only Section components

🔝

Section

This component is the container for one or more Description.

  • Childrens
Number of children Required Value Allowed
Many At least the first Description component is required Only Description components
  • Props
Name Type Required Description
title string true It's the title of any section

🔝

Description

This component can be the text of the description or a subtitle

  • Props
Name Type Required Values Allowed default values Description
variant string false subtitle or description description Transform the format of the text
text string true Any text does not apply Show the description of the Section

🔝

How to use it

The following snippet will show you how to use the library:

Using class components:

import {
 Timeline,
 Container,
 YearContent,
 BodyContent,
 Section,
 Description,
} from 'vertical-timeline-component-react';

const customTheme = {
 yearColor: '#405b73',
 lineColor: '#d0cdc4',
 dotColor: '#262626',
 borderDotColor: '#d0cdc4',
 titleColor: '#405b73',
 subtitleColor: '#bf9765',
 textColor: '#262626',
};

class Main extends Component {
 render() {
  return(
   <Timeline theme={customTheme} dateFormat='full'>
    <Container>
     <YearContent startDate='2020/07/01' currentYear />
     <BodyContent>
      <Section title='Title'>
       <Description variant='subtitle' text='Subtitle' />
       <Description text='Description' />
       <Description text='Another description' />
      </Section>

      <Section title='Another title'>
       <Description text='Description' />
       <Description text='Another description' />
      </Section>
     </BodyContent>
    </Container>
   </Timeline>,
  );
 }
}

Using function components:

import {
	Timeline,
	Container,
	YearContent,
	BodyContent,
	Section,
	Description,
} from 'vertical-timeline-component-react';

const Main = () => {
	const customTheme = {
		yearColor: '#405b73',
		lineColor: '#d0cdc4',
		dotColor: '#262626',
		borderDotColor: '#d0cdc4',
		titleColor: '#405b73',
		subtitleColor: '#bf9765',
		textColor: '#262626',
	};

	return (
		<Timeline theme={customTheme} dateFormat='full'>
			<Container>
				<YearContent startDate='2020/07/01' currentYear />
				<BodyContent>
					<Section title='Title'>
						<Description variant='subtitle' text='Subtitle' />
						<Description text='Description' />
						<Description text='Another description' />
					</Section>

					<Section title='Another title'>
						<Description text='Description' />
						<Description text='Another description' />
					</Section>
				</BodyContent>
			</Container>
		</Timeline>
	);
};

🔝

Contributors

🔝

License

MIT

🔝

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].