Skip to main content
Ring displays a value as a circular arc that fills clockwise from 12 o’clock. A centered label shows the value or any custom text. It shares the same value/min/max/variant API as Progress but takes up less horizontal space, making it ideal for dashboards and status panels.

Basic Usage

Sizes

Three sizes control the ring diameter: sm (64px), default (96px), and lg (128px).

Variants

Semantic variants color the filled arc to communicate meaning at a glance:

Thickness

The thickness prop controls the stroke width of the ring arc. The default is 6.

Custom Range

Set min and max to define a range other than 0–100. The renderer normalizes the value to a percentage automatically.

Custom Center Content

Use Ring as a container to place arbitrary components in the center. When children are present, they replace the label text.

API Reference

Ring Parameters

value
float | str
default:"0"
Current value. Can be a template expression for dynamic binding.
min
float
default:"0"
Minimum value. The renderer normalizes (value - min) / (max - min) to a 0–100 percentage.
max
float
default:"100"
Maximum value.
label
str | None
default:"None"
Text displayed in the center of the ring. Supports template expressions. Ignored when children are present.
children
list[Component]
default:"[]"
Arbitrary components rendered in the center of the ring, replacing the label.
variant
str
default:"default"
Visual variant: "default", "success", "warning", "destructive", "info", "muted".
size
str
default:"default"
Ring diameter: "sm" (64px), "default" (96px), "lg" (128px).
thickness
float
default:"6"
Stroke width of the ring arc in pixels.
css_class
str | None
default:"None"
Tailwind classes for the outer container.

Protocol Reference

Ring
{
  "type": "Ring",
  "children?": "[Component]",
  "let?": "object",
  "value?": "number | string",
  "min?": 0,
  "max?": 100,
  "label?": "string",
  "variant?": "default | success | warning | destructive | info | muted",
  "size?": "sm | default | lg",
  "thickness?": 6,
  "cssClass?": "string"
}
For the complete protocol schema, see Ring.