# Breathing exercises

Canonical page: https://docs.ovok.com/native-sdk/guide/modules/breathing-exercise

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 [#render-an-exercise]

```tsx
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 [#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.

## References [#references]

- [BreathingExercise and its props](/native-sdk/guide/components/breathing-exercise/breathing-exercise/)
- [BreathingExerciseProvider](/native-sdk/guide/components/breathing-exercise/breathing-exercise-provider/)
- [useBreathingExercise](/native-sdk/guide/components/breathing-exercise/use-breathing-exercise/)
- [Types](/native-sdk/guide/components/breathing-exercise/types/)

## API reference [#api-reference]

Every export of `@ovok/native/breathing-exercise`, with signatures, props and types, is in the [`breathing-exercise` API reference](/native-sdk/reference/breathing-exercise).
