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

@bonosoft/sveltekit-progress

v0.0.1

Published

Progress component for SvelteKit

Downloads

9

Readme

Progress circle for SvelteKit

With this module, you are able to add circular or square progress bars to you Sveltekit site.

Install

Use your package manager to install the module:

npm install @bonosoft/sveltekit-progress

Adding Progress to a svelte file in SvelteKit

Now you can start adding circular progress components to your pages.

<script lang="ts">
	import Progress from "@bonosoft/sveltekit-progress"
</script>

<Progress progress="50"/>

The standard progress bar can be modefied by adding different parameters.

Sample code

Progress circles

<Progress progress="0"/>
<Progress progress="25"/>
<Progress progress="50"/>
<Progress progress="75"/>
<Progress progress="100"/>

Parameter progress is use to set the shown progress.

Front, back and border colors, for use in dark mode

Progress circles

<Progress progress="0"   textColor="#eee" bgcolor="#111" borderColor="#333"/>
<Progress progress="25"  textColor="#eee" bgcolor="#111" borderColor="#333"/>
<Progress progress="50"  textColor="#eee" bgcolor="#111" borderColor="#333"/>
<Progress progress="75"  textColor="#eee" bgcolor="#111" borderColor="#333"/>
<Progress progress="100" textColor="#eee" bgcolor="#111" borderColor="#333"/>

<Progress progress="30" color="#29F" textColor="#eee" bgcolor="#111" borderColor="#333"/>
<Progress progress="40" color="#2F2" textColor="#eee" bgcolor="#111" borderColor="#333"/>
<Progress progress="50" color="#F92" textColor="#eee" bgcolor="#111" borderColor="#333"/>
<Progress progress="60" color="#F22" textColor="#eee" bgcolor="#111" borderColor="#333"/>
<Progress progress="70" color="#92F" textColor="#eee" bgcolor="#111" borderColor="#333"/>

With parameters for color, textcolor, bgcolor and bordercolor, you are able to style the color of the progress bar, the text inside, the background inside and the rest part of the progress area.

Front, back and border colors

Progress circles

<Progress progress="30" color="#29F" textColor="#29F"/>
<Progress progress="40" textColor="#F22"/>
<Progress progress="50" textColor="#29F" labelText="Online"/>
<Progress progress="60" labelText="Backup"/>
<Progress progress="70" textColor="#292" borderColor="#F22"/>

Here are samples of different colors for progress, text and the area between progress and 100%. The samples also shows how to add an extra text label.

Size

Progress circles

<Progress progress=0 size=30/>
<Progress progress=25 size=50/>
<Progress progress=50 size=70/>
<Progress progress=75 size=90/>
<Progress progress=100 size=110/>

With the size parameter, you are able to control the size of the progress bar.

Border width

Progress circles

<Progress progress=0 borderWeight="1"/>
<Progress progress=25 borderWeight="3"/>
<Progress progress=50 borderWeight="8"/>
<Progress progress=75 borderWeight="15"/>
<Progress progress=100 borderWeight="20"/>

This borderWeight controls the width of the progress bar, so you are able to make thin or really thick bars.

Border radius

Progress circles

<Progress progress=12.5 borderRadius=0/>
<Progress progress=25 borderRadius=15/>
<Progress progress=50 borderRadius=30/>
<Progress progress=85 borderRadius=40/>
<Progress progress=100 borderRadius=50/>

Don't like the clasic circle design, change the borderRadius to get a square or rounded square.

Showing you own center content

Progress circles

<Progress size="150" progress="50" customContent=false>
 <svg width="30" height="30" viewBox="0 0 24 24"> <path.../> </svg>
</Progress>  

<Progress size="150" progress="50" customContent="true">
 Text
</Progress>  

<Progress size="150" progress="50" customContent="true">
 <svg width="80" height="80" viewBox="0 0 384 512"><path.../></svg>
</Progress>  

Want to add special content to the progress circel, just add it inside the Progress module tag. With the customContent parameter you can hide the default content, to provide more space for your content.