Tile.CompleteAnimation
Success animation overlay component that displays a celebratory animation when measurements are completed, providing positive user feedback and visual confirmation.
Quick Example
import { Tile } from "@ovok/native";
import React from "react";
const CompleteAnimationExample = () => {
const [showAnimation, setShowAnimation] = React.useState(true);
const handleAnimationEnd = () => {
console.log("Animation completed");
setShowAnimation(false);
};
return (
<Tile>
<Tile.StartSection
isCompleted={true}
testID="measurement-start-section"
/>
<Tile.Title testID="measurement-title">
Blood Pressure Measurement
</Tile.Title>
{showAnimation && (
<Tile.CompleteAnimation
onAnimationEnd={handleAnimationEnd}
testID="success-animation"
/>
)}
</Tile>
);
};
export default CompleteAnimationExample;
Props
| Prop | Type | Required | Default | Description |
|---|---|---|---|---|
onAnimationEnd | () => void | - | - | Callback fired when animation completes |
testID | string | - | - | Test identifier for automated testing |
Component Behavior
The CompleteAnimation component:
- Overlay: Positions absolutely over the entire tile content
- Entry Animation: Fades in smoothly when displayed
- Success Icon: Shows large green checkmark (TickCircle, 50px, Bold variant)
- Completion Text: Displays "Completed" message below the icon
- Duration: Runs for 3 seconds before triggering callback
- Exit Animation: Fades out smoothly when removed
- Callback: Executes
onAnimationEndwhen animation finishes
Animation Timeline
0ms - Component mounts
0-300ms - FadeIn entrance animation
3000ms - Animation duration completes
- onAnimationEnd callback fired (if provided)
3000ms+ - FadeOut exit animation (when component unmounts)
Styling
Theme Colors Used
theme.colors.surface- Background overlay colortheme.colors.success- Checkmark icon colortheme.spacing(2)- Gap between icon and text
Related Components
- Tile.MeasuringSpinner - Loading state before completion
- Tile.MeasuredValue - Result display after animation
- Tile.Status - Status updates throughout measurement process