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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@libs-ui/components-process-bar-circle

v0.2.356-37

Published

> Component hiển thị tiến trình dạng vòng tròn (Circular Progress Bar) trực quan, hỗ trợ tùy biến kích thước, màu sắc và nhãn hiển thị.

Readme

@libs-ui/components-process-bar-circle

Component hiển thị tiến trình dạng vòng tròn (Circular Progress Bar) trực quan, hỗ trợ tùy biến kích thước, màu sắc và nhãn hiển thị.

Giới thiệu

LibsUiComponentsProcessBarCircleComponent là một giải pháp hiển thị tiến trình dạng SVG hình tròn. Nó nhẹ, có khả năng mở rộng cao và cho phép tùy chỉnh sâu về giao diện thông qua hệ thống Input dựa trên cấu hình (config object).

Tính năng

  • SVG-based: Độ sắc nét cao trên mọi độ phân giải.
  • Cấu hình linh hoạt: Thay đổi kích thước (size), độ dày (stroke width), màu sắc (color) dễ dàng.
  • Smooth Animations: Chuyển đổi mượt mà khi giá trị phần trăm thay đổi.
  • Label Control: Tùy chọn hiển thị hoặc ẩn nhãn phần trăm ở giữa vòng tròn.
  • OnPush Change Detection: Tối ưu hóa hiệu suất render.
  • Angular Signals: Tận dụng cơ chế phản ứng mới của Angular.

Khi nào sử dụng

  • Hiển thị phần trăm hoàn thành của một tác vụ cụ thể.
  • Biểu diễn số liệu thống kê (ví dụ: dung lượng lưu trữ đã dùng).
  • Làm bộ chỉ báo tải (loading indicator) có trạng thái.
  • Trang trí dashboard với các biểu đồ tiến trình nhỏ gọn.

Cài đặt

# npm
npm install @libs-ui/components-process-bar-circle

# yarn
yarn add @libs-ui/components-process-bar-circle

Import

import { LibsUiComponentsProcessBarCircleComponent } from '@libs-ui/components-process-bar-circle';

@Component({
  standalone: true,
  imports: [LibsUiComponentsProcessBarCircleComponent],
  // ...
})
export class YourComponent {}

Ví dụ

Cơ bản

<libs_ui-components-process_bar-circle [config]="{ percent: 75 }" />

Tùy chỉnh kích thước và màu sắc

<libs_ui-components-process_bar-circle
  [config]="{
    percent: 45,
    size: 150,
    strokeWidth: 12,
    color: '#10b981',
    backgroundColor: '#ecfdf5',
    labelClass: 'text-xl font-bold text-emerald-600'
  }" />

API

libs_ui-components-process_bar-circle

Inputs

| Property | Type | Default | Description | | ---------- | ---------------------------- | ------------ | --------------------------------------- | | [config] | IProcessBarCircleInterface | Bắt buộc | Đối tượng cấu hình cho vòng tiến trình. |

Types & Interfaces

export interface IProcessBarCircleInterface {
  /** Phần trăm hoàn thành (0-100) */
  percent: number;
  /** Kích thước của vòng tròn (px), mặc định 100 */
  size?: number;
  /** Độ dày của đường tiến trình (px), mặc định 8 */
  strokeWidth?: number;
  /** Màu của đường tiến trình, mặc định #3b82f6 (Blue 500) */
  color?: string;
  /** Màu nền của vòng tròn, mặc định #f1f5f9 (Slate 100) */
  backgroundColor?: string;
  /** Có hiển thị chữ số phần trăm ở giữa không, mặc định true */
  showLabel?: boolean;
  /** Class CSS tùy chỉnh cho nhãn phần trăm */
  labelClass?: string;
  /** Class CSS tùy chỉnh cho container */
  classInclude?: string;
}

Hidden Logic

1. SVG Calculations

Component tự động tính toán các thuộc tính SVG (stroke-dasharray, stroke-dashoffset) dựa trên sizestrokeWidth để đảm bảo vòng tròn luôn căn giữa và không bị cắt mất viền khi thay dổi độ dày.

2. Transition Smoothing

Sử dụng CSS transitions trên thuộc tính stroke-dashoffset giúp việc cập nhật giá trị tiến trình diễn ra mượt mà mà không cần đến logic JavaScript phức tạp.

Demo

# Xem demo trực tiếp
npx nx serve core-ui

Truy cập: http://localhost:4200/process-bar/circle

License

MIT