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

svelte-timeline

v0.1.2

Published

A Svelte Timeline component. This is what is looks like: ![image info](https://github.com/SumitBando/svelte-timeline/raw/main/static/timeline-sample.png "Sample")

Downloads

14

Readme

What

A Svelte Timeline component. This is what is looks like: image info

If time permits, will try to remove dependencies.

Original Tailwind snippet was from: https://codepen.io/sheikh_ishaan/pen/oNWpgoK

Use

Install

npm i svelte-timeline

To use, pass an array of Event objects, which has at least a title.

/**
 * @typedef {Object} Event
 * @property {string} title
 * @property {string} [date]
 * @property {string} [status]
 */

A date field, if passed, is shown. Though it is used to display a sequence of timed events, the component has no understanding of time, you can pass arbitary string in the date field, or even omit it.

The 'status' field controls the color and associated icon displayed for an Event. If the value is 'success', it is displayed a background of bg-green-500, with a fa-check-circle icon.

For 'error', it is displayed with a background of bg-red-500, with a fa-times-circle icon.

If a status field is not included, it is displayed with a background of bg-gray-300, with text color of text-gray-400, with a fa-exclamation-circle icon.

The above values are all props, and can be overridden.

If the optional prop 'heading' is passed, it is displayed at top.

In your route or component,

<script>
 import {Timeline} from 'svelte-timeline'
 const events = [
  {
   title: 'Step1',
   date: 'Dec 18, 2021',
   status: 'success'      
  },
  {
   title: 'Step2',
   status: 'error'
  },
  {
   title: 'Step3',
  }
 ]  
<script>

<Timeline {events} heading='Something'/>

Developing

To improve this, fork this project.

After you have installed dependencies with npm install (or pnpm install or yarn), start a development server:

npm run dev
# or start the server and open the app in a new browser tab
npm run dev -- --open

Building npm package

npx svelte-kit package

To test locally without publishing

npx svelte-kit package
cd package
npm link

Cd to a test project

npm link svelte-timeline

Random notes

This project was created with

npm init svelte@next svelte-timeline
cd svelte-timeline
npx svelte-add@latest tailwindcss
npm install -D svelte2tsx