Breathing exercises
Use the breathing exercise module when a screen needs a timed inhale, hold, and exhale sequence. The SDK provides the animation and timer; your app decides when to start the exercise, what completion means, and whether to save the result.
Render an exercise
import { BreathingExercise } from "@ovok/native/breathing-exercise";
<BreathingExercise
methods={[
{ type: "inhale", duration: 4 },
{ type: "hold", duration: 4 },
{ type: "exhale", duration: 6 },
]}
repeat={4}
onFinish={handleFinish}
/>
Durations are expressed in seconds. Keep the sequence and repeat count in the
screen's configuration so they can reflect the care plan or product experience.
Use onFinish to advance the screen or record completion; it does not persist a
clinical observation for you.
Add controls around the animation
Use BreathingExerciseProvider and useBreathingExercise when the screen needs
custom start, pause, or reset controls around the SDK animation. Keep those controls
in the same provider subtree. If the built-in controls meet the need, use
BreathingExercise directly.