Sinua
Catalog

Ring

Progress in five patterns (an arc, nested goals, steps, a gauge, a spinner) and a ring that shows who is talking.

The ring shows progress: one arc, several nested goals, discrete steps or a gauge. Drive it with progress (or a list of them) from your app.

See every ring pattern live

When to use which pattern

PatternpatternWhen to use it
CompletingcompletingOne task's progress: an arc that fills.
LoadingloadingIndeterminate wait: a spinner.
TrackingtrackingSeveral goals at once: nested activity rings with extra laps.
SteppingsteppingDiscrete steps: segments that fill one by one.
MeasuringmeasuringA reading within a range: a gauge.
TalkingtalkingWho is talking: a ring round a participant's picture.

Who is talking

talking is a ring round a person's picture, for a call or a group conversation. It thickens outward with their voice and never covers the face; ripples go out while they speak and in while they listen, and an arc circles while they think. SinuaAvatar puts the image in the middle for you (not on React Native yet).

avatar-react.tsx
import { SinuaAvatar } from "@sinua/web/react";
import type { VoiceSource } from "@sinua/core";

// A participant's picture with a ring that shows who is talking: it thickens outward
// with the voice and never covers the face. The ring is decorative; `alt` names the person.
export function Speaker({ voice }: { voice: VoiceSource }) {
  return <SinuaAvatar src="/ada.jpg" alt="Ada" voice={voice} style={{ width: 56 }} />;
}

Props

Every prop, per pattern. Values are your app's data; everything else is style. Defaults can differ per size (20 · 32 · 64).

The ring component is SinuaRing. Pick a look with pattern; each pattern reads the props below. Sizes are engine sizes (20, 32, 64): defaults can differ per size.

PatternModeSpeedValues (app data)
Completing (completing)arc1×progress
Loading (loading)spinner1×—
Tracking (tracking)nested1×progress
Stepping (stepping)segmented1×progress, segment
Measuring (measuring)gauge1×progress
Talking (talking)speaker1×—

Completing

pattern: "completing" · mode arc · speed 1× · sizes 20, 32, 64

PropCategoryTypeRangeDefaultDescription
gapAppearancenumber0–8 (UI 0–3) x1Gap between the indicator and the track, in stroke widths.
hueAppearancenumber0–360 deg200Ink hue in degrees; applies once saturation is above 0.
inkAppearancenumber0–1 fraction1How present the whole visual is: 1 draws it as the pattern defines it, lower fades everything including its halos. A voice assistant rests below 1 when idle and comes to full ink when it listens.
saturationAppearancenumber0–1 fraction0How far the ink moves from grey toward the hue (0 = the grey ink).
strokeWidthAppearancenumber0.01–0.4 (UI 0.02–0.25) fraction0.085Stroke width as a fraction of the frame.
trackOpacityAppearancenumber0–1 (UI 0–0.6) fraction0.18Opacity of the faint track behind the indicator (0 = none).
progressInputsnumber0–1 fraction0How much of the ring is filled, 0 to 1.

Loading

pattern: "loading" · mode spinner · speed 1× · sizes 20, 32, 64

PropCategoryTypeRangeDefaultDescription
gapAppearancenumber0–8 (UI 0–3) x1Gap between the indicator and the track, in stroke widths.
hueAppearancenumber0–360 deg200Ink hue in degrees; applies once saturation is above 0.
inkAppearancenumber0–1 fraction1How present the whole visual is: 1 draws it as the pattern defines it, lower fades everything including its halos. A voice assistant rests below 1 when idle and comes to full ink when it listens.
saturationAppearancenumber0–1 fraction0How far the ink moves from grey toward the hue (0 = the grey ink).
strokeWidthAppearancenumber0.01–0.4 (UI 0.02–0.25) fraction0.085Stroke width as a fraction of the frame.
trackOpacityAppearancenumber0–1 (UI 0–0.6) fraction0Opacity of the faint track behind the indicator (0 = none).

Tracking

pattern: "tracking" · mode nested · speed 1× · sizes 20, 32, 64

PropCategoryTypeRangeDefaultDescription
hueAppearancenumber0–360 deg200Ink hue in degrees; applies once saturation is above 0.
hueStepAppearancenumber-180–180 (UI -90–90) deg0Degrees of hue added per ring (0 = one hue).
inkAppearancenumber0–1 fraction1How present the whole visual is: 1 draws it as the pattern defines it, lower fades everything including its halos. A voice assistant rests below 1 when idle and comes to full ink when it listens.
ringCountAppearanceinteger1–43Concentric rings, outermost first.
saturationAppearancenumber0–1 fraction0How far the ink moves from grey toward the hue (0 = the grey ink).
spacingAppearancenumber0–2 x0.25Gap between rings, in stroke widths.
strokeWidthAppearancenumber0.01–0.4 (UI 0.02–0.25) fraction0.07Stroke width as a fraction of the frame.
trackOpacityAppearancenumber0–1 (UI 0–0.6) fraction0.18Opacity of the faint track behind the indicator (0 = none).
Advanced props (2)
PropCategoryTypeRangeDefaultDescription
maxLapsAppearancenumber1–103The most laps a ring value can draw.
progressInputsnumber[] (1–4, length = ringCount)0–3[]Per-ring value; past 1 draws extra laps (up to maxLaps). Also accepted: progress0, progress1, progress2, progress3.

Stepping

pattern: "stepping" · mode segmented · speed 1× · sizes 20, 32, 64

PropCategoryTypeRangeDefaultDescription
gapAppearancenumber0–8 (UI 0–3) x0.3333Visible gap between segments, in stroke widths.
hueAppearancenumber0–360 deg200Ink hue in degrees; applies once saturation is above 0.
inkAppearancenumber0–1 fraction1How present the whole visual is: 1 draws it as the pattern defines it, lower fades everything including its halos. A voice assistant rests below 1 when idle and comes to full ink when it listens.
saturationAppearancenumber0–1 fraction0How far the ink moves from grey toward the hue (0 = the grey ink).
segmentCountAppearancenumber1–245Number of equal segments.
strokeWidthAppearancenumber0.01–0.4 (UI 0.02–0.25) fraction0.085Stroke width as a fraction of the frame.
trackOpacityAppearancenumber0–1 (UI 0–0.6) fraction0.18Opacity of the faint track behind the indicator (0 = none).
progressInputsnumber0–1 fraction0How many segments are filled, as a fraction 0 to 1.
Advanced props (1)
PropCategoryTypeRangeDefaultDescription
segmentInputsnumber[] (1–24, length = segmentCount)0–1 fraction[]Per-segment fill (0 to 1) when segments fill independently; overrides progress for the segments given.

Measuring

pattern: "measuring" · mode gauge · speed 1× · sizes 20, 32, 64

PropCategoryTypeRangeDefaultDescription
fillAppearanceboolean1Draw the value bar.
hueAppearancenumber0–360 deg200Ink hue in degrees; applies once saturation is above 0.
inkAppearancenumber0–1 fraction1How present the whole visual is: 1 draws it as the pattern defines it, lower fades everything including its halos. A voice assistant rests below 1 when idle and comes to full ink when it listens.
markerAppearanceboolean0Draw a marker dot at the value.
saturationAppearancenumber0–1 fraction0How far the ink moves from grey toward the hue (0 = the grey ink).
strokeWidthAppearancenumber0.01–0.4 (UI 0.02–0.25) fraction0.085Stroke width as a fraction of the frame.
sweepAppearancenumber90–330 deg270Total arc of the gauge in degrees; the opening is centred at the bottom.
trackOpacityAppearancenumber0–1 (UI 0–0.6) fraction0.18Opacity of the faint track behind the indicator (0 = none).
progressInputsnumber0–1 fraction0The gauge value, 0 to 1.
Advanced props (1)
PropCategoryTypeRangeDefaultDescription
gapAppearancenumber0–8 x1Gap at the gauge's value end, in stroke widths.

Talking

pattern: "talking" · mode speaker · speed 1× · sizes 20, 32, 64

PropCategoryTypeRangeDefaultDescription
avatarGapAppearancenumber0–0.05 (UI 0–0.04) fraction0.012Space between the avatar's edge and the ring, as a fraction of the frame.
hueAppearancenumber0–360 deg200Ink hue in degrees; applies once saturation is above 0.
idleOpacityAppearancenumber0–1 fraction0.35The ring's opacity when nobody is speaking (0 = hidden until there's a voice).
inkAppearancenumber0–1 fraction1How present the whole visual is: 1 draws it as the pattern defines it, lower fades everything including its halos. A voice assistant rests below 1 when idle and comes to full ink when it listens.
innerRadiusAppearancenumber0.1–0.44 (UI 0.2–0.42) fraction0.34Radius of the avatar the ring surrounds, as a fraction of the frame; nothing is drawn inside it.
saturationAppearancenumber0–1 fraction0How far the ink moves from grey toward the hue (0 = the grey ink).
thicknessAppearancenumber0.004–0.1 (UI 0.008–0.06) fraction0.022The ring's resting stroke width, as a fraction of the frame.
flowMotionnumber-1–10Ripples outside the ring: +1 travel outward (giving out, speaking), -1 come inward (taking in, listening), 0 none. The voice states set it.
rippleCountMotioninteger0–42How many ripples travel at once when flow is on.
shimmerMotionnumber0–1 fraction0A brighter arc that circles the ring (thinking, connecting); 0 = off.
reachEnergynumber0–0.12 fraction0.04How much thicker the ring grows at full voice, outward only, as a fraction of the frame.

On this page