GuidesComponents

ProgressRing

Accessible circular progress with a distinct unknown state and optional center content

  • Stable unknown
  • Release candidate since 1.16.1-rc.3
  • Development since 1.16.1-dev.2111+9796905

ProgressRing displays a fraction from 0 to 1, or a dashed ring when the target is unknown. It can contain any React content and can optionally respond to presses.

import { ProgressRing } from "@ovok/native/progress-ring";
import { Text } from "react-native";

<ProgressRing progress={0.65} accessibilityLabel="Daily goal" size={64}>
  <Text>65%</Text>
</ProgressRing>

<ProgressRing accessibilityLabel="Daily goal unavailable" />

When progress is omitted or null, the ring uses a dashed indicator and does not announce an empty value. Finite values are clamped to 0–1. Set onPress to make the ring a button; otherwise it exposes progress-bar accessibility semantics. Provide an accessibilityLabel appropriate to the host app's language and context.

PropTypeDefaultDescription
progressnumber | nullunknownFraction from 0 to 1; omitted or null means unknown.
childrenReactNode-Optional content centered inside the ring.
sizenumber48Width and height in points.
strokeWidthnumber4Ring thickness in points.
colorstringtheme primaryProgress indicator color.
trackColorstringtheme gray 300Background ring color.
onPressPressableProps['onPress']-Makes the ring tappable.

Other supported accessibility and pressable props are forwarded to the root component. Render it below the SDK ThemeProvider so default colors come from the active theme.

Last updated on