GithubHelp home page GithubHelp logo

sytanta / svelte-animated-timeline Goto Github PK

View Code? Open in Web Editor NEW
4.0 2.0 0.0 68 KB

Timeline component supporting animation, custom icon, vertical & horizontal modes

Home Page: https://svelte-animated-timeline.netlify.app

JavaScript 2.55% TypeScript 18.27% HTML 0.84% Svelte 45.62% CSS 32.71%
svelte svelte-component timeline typescript svelte-timeline

svelte-animated-timeline's Introduction

svelte-animated-timeline

Timeline component supporting animation, custom icon, vertical & horizontal modes

This component is created and inspired by react-vertical-timeline

Install

npm i svelte-animated-timeline

Usage

  • Basic usage
<script lang="ts">
    import { Timeline, TimelineElement } from 'svelte-animated-timeline';

	import WorkIcon from '$lib/components/WorkIcon.svelte';
</script>

<Timeline id="timeline" triggerOnce={false} lineColor="#dddddd">
	<TimelineElement
		id="elm1"
		class="svelte-timeline-element--work"
		date="2011 - present"
		contentStyle={{ background: 'rgb(33, 150, 243)', color: '#fff' }}
		contentArrowStyle={{ 'border-right': '7px solid  rgb(33, 150, 243)' }}
		iconStyle={{ background: 'rgb(33, 150, 243)', color: '#fff' }}
	>
		<WorkIcon slot="icon" />
		<h3 class="svelte-timeline-element-title">Creative Director</h3>
		<h4 class="svelte-timeline-element-subtitle">Miami, FL</h4>
		<p>Creative Direction, User Experience, Visual Design, Project Management, Team Leading</p>
	</TimelineElement>
	<TimelineElement
		id="elm2"
		class="svelte-timeline-element--work"
		date="2010 - 2011"
		iconNoDefaultStyle
		iconStyle={{ background: 'red', 'border-radius': '50%' }}
		contentStyle={{ background: 'papayawhip' }}
	>
		<WorkIcon slot="icon" />
		<h3 class="svelte-timeline-element-title">Art Director</h3>
		<h4 class="svelte-timeline-element-subtitle">San Francisco, CA</h4>
		<p>Creative Direction, User Experience, Visual Design, SEO, Online Marketing</p>
	</TimelineElement>
</Timeline>
  • Full line timeline
<script lang="ts">
    import { Timeline, TimelineElement } from 'svelte-animated-timeline';

	import WorkIcon from '$lib/components/WorkIcon.svelte';
</script>

<Timeline id="timeline" triggerOnce={false} lineAmongTimelineElementsOnly={false}>
	<TimelineElement
		id="elm1"
		class="svelte-timeline-element--work"
		date="2011 - present"
		contentStyle={{ background: 'rgb(33, 150, 243)', color: '#fff' }}
		contentArrowStyle={{ 'border-right': '7px solid  rgb(33, 150, 243)' }}
		iconStyle={{ background: 'rgb(33, 150, 243)', color: '#fff' }}
	>
		<WorkIcon slot="icon" />
		<h3 class="svelte-timeline-element-title">Creative Director</h3>
		<h4 class="svelte-timeline-element-subtitle">Miami, FL</h4>
		<p>Creative Direction, User Experience, Visual Design, Project Management, Team Leading</p>
	</TimelineElement>
	<TimelineElement
		id="elm2"
		class="svelte-timeline-element--work"
		date="2010 - 2011"
		iconNoDefaultStyle
		iconStyle={{ background: 'red', 'border-radius': '50%' }}
		contentStyle={{ background: 'papayawhip' }}
	>
		<WorkIcon slot="icon" />
		<h3 class="svelte-timeline-element-title">Art Director</h3>
		<h4 class="svelte-timeline-element-subtitle">San Francisco, CA</h4>
		<p>Creative Direction, User Experience, Visual Design, SEO, Online Marketing</p>
	</TimelineElement>
</Timeline>

svelte-animated-timeline's People

Contributors

sytanta avatar

Stargazers

luxus avatar Jørgen Kalsnes Hagen avatar Will Jarrard avatar Sohaib Athar avatar

Watchers

 avatar  avatar

svelte-animated-timeline's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.