Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

radial-progress-svelte

Package Overview
Dependencies
Maintainers
0
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

radial-progress-svelte

🤗 Svelte Radial Progress

  • 1.0.2
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
0
Weekly downloads
 
Created
Source

🤗 Svelte Radial Progress

Screenshot 2024-10-12 at 22 20 13


radial-progress-svelte is a light-weight responsive SVG radial progress component for Svelte.

✨Demo

Click here to see a live demo

Install

npm i radial-progress-svelte

Usage

<script>
import { RadialProgress } from 'radial-progress-svelte';

const maxTotalSize = 150;
const thickness = 30;
const size = 200;
const data = [
	{ value: 40, color: '#2B2EFF' },
	{ value: 20, color: '#1761FF' },
	{ value: 60, color: '#1761FF' }
];

$: totalProgress = data.reduce((acc, curr) => acc + curr.value, 0);
</script>

<RadialProgress {data} {maxTotalSize} {thickness} {size}>
   <div>{totalProgress} / {maxTotalSize}</div>
</RadialProgress>

ℹ️ In case the size parameter is not provided, the radial progress component will automatically adjust its size to fit in the parent element.

Component props

nametypedefaultdescription
dataArray<{ value: number, color: string }>[]Dataset for the radial progress component
maxTotalSizeNumberThe total sum of the value from the `data` propSpecifies the maximum total size
thicknessNumber30Specifies the thickness of the radial progress bar
sizeNumberundefinedSpecify a fixed size for the radial progress component. In case it's not provided, the component will automatically adjust its size to fit in the parent element, which is a better scenario in case you want responsiveness
backgroundColorString'#D9D9D9'The color of the remaining space of the radial progress bar

Component slots

namedefaultdescription
DefaultEmptyContent to be displayed inside the radial progress component

Contribute

  1. Fork the repo
  2. Clone the forked repo

Install and run the project

npm install
npm run dev

FAQs

Package last updated on 13 Oct 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc