---
title: tween
---

# tween

<a href="https://github.com/remix-run/remix/blob/remix@3.0.0-alpha.6/packages/ui/src/animation/tween.ts#L105" target="_blank">View Source</a>

## Summary

Generator that tweens a value over time using a cubic bezier curve.
Yields the current value on each frame. Use the iterator's `done` property
to check if the animation is complete.

## Signature

```ts
function tween(options: TweenOptions): Generator<number, number, number>;

```

## Params

### options

The tween configuration

## Returns

The final value