vue-simple-arc

Lightweight Vue 3 gauge: SVG half arc and circular progress ring. Animated, responsive, accessible, SSR-ready, TypeScript, zero dependencies (~1.6 kB gzip).
509
Install
npm install vue-simple-arc
Latest Version:0.3.0
Vue:3
License:MIT
Last Updated:Sep 30, 2026
Links: GitHub  ·  npm
Maintainer: luyny

SimpleArc

Lightweight Vue 3 SVG arc / circle progress component. Animated, responsive, accessible, server-side rendered and with zero runtime dependencies (~1.6 kB gzip).

vue-simple-arc demo: animated value, thickness, responsive width, dark mode and colors

Installation

npm i vue-simple-arc

Import

import { SimpleArc } from 'vue-simple-arc';
// or: import SimpleArc from 'vue-simple-arc';

SimpleArcComponent is still exported as an alias of SimpleArc for backward compatibility.

TypeScript

The props type is exported:

import type { SimpleArcProps } from 'vue-simple-arc';

Usage

<SimpleArc
    :value="percentage"
    width="350px"
    :fullCircle="false"
    :thickness="8"
    color="#41b883"
    trackColor="#80808040"
    aria-label="Sales goal"
>
    <strong>{{ Math.round(percentage * 100) }}%</strong>
</SimpleArc>

Props

Prop Type Required Default Description
value Number yes — Progress between 0 and 1. Values outside this range are clamped; NaN is treated as 0.
width String no '100%' Any CSS width. The arc redraws when the container is resized.
fullCircle Boolean no false Draws a full circle instead of a half arc.
thickness Number no 8 Progress line thickness in px.
trackThickness Number no thickness / 5 Background line (track) thickness in px.
color String no '#41b883' Color of the progress line.
trackColor String no '#80808040' Color of the background line. The default is visible on light and dark backgrounds.
secondColor String no — Deprecated, use trackColor. Still works as an alias and logs a warning once.

Animation

Value changes animate with a CSS transition on the progress line, including from and back to 0. Customize it with CSS variables on the component or any ancestor:

Variable Default Description
--simple-arc-duration 0.4s Transition duration. Use 0s to disable it.
--simple-arc-easing ease Transition timing function.
.my-gauge { --simple-arc-duration: 1s; --simple-arc-easing: cubic-bezier(.2, .8, .2, 1); }

The animation is turned off automatically when the user prefers reduced motion. Resizing never triggers it.

SSR / Nuxt

The arc is fully rendered on the server, so there is no empty SVG waiting for hydration. Before the component is mounted it draws with a 200px reference width and scales it to the container: in larger containers the line looks proportionally thicker, and the height can shift by a few pixels (proportional to thickness) once hydration measures the real width.

Migrating from 0.2

No breaking changes. secondColor still works but is deprecated: rename it to trackColor. The track thickness can now be set with trackThickness (the default stays thickness / 5).

Slot

The default slot is placed at the bottom center of the half arc, or at the center of the full circle. It inherits the parent's font size and color.

Accessibility

The root element has role="progressbar", aria-valuemin="0", aria-valuemax="100" and aria-valuenow (the value as a percentage). Pass aria-label or aria-labelledby to describe what is being measured.

Related Packages

@kagronick/kgauge-vue

JustGage rebuilt for Vue in only 8kb

1,342 5
vue-circular-gauge

Circular gauge component for Vue.js with customizable colors, animations, and th...

4,173 21
@richardmcquiston01/dashboard-widgets-toolkit

Framework-agnostic dashboard widget toolkit: typed widget definitions and data p...

3,815 0
vue-js-star-rating

Zero-dependency Vue 3.5+ star rating component — WCAG 2.2 accessible, TypeScript...

6,387 4
base-ui-vue

Vue port of Base UI

1,810 59

Version History

Version Released Vue License
0.3.0 ^3.3.0 MIT
0.2.0 ^3.3.0 MIT
0.1.4 ^3.0.0 MIT
0.1.3 ^3.0.0
0.1.2 ^3.0.0