From f706207e6e079c1fbd25ceb54e56cd530f58b8df Mon Sep 17 00:00:00 2001 From: sindri <33976067+isarsindri@users.noreply.github.com> Date: Tue, 3 Mar 2026 12:02:07 +0100 Subject: [PATCH] Document Tween module and its functions Added documentation for the Tween module, including usage and exports. --- docs/api/animation.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/docs/api/animation.md b/docs/api/animation.md index ca06b39..b7e8ac5 100644 --- a/docs/api/animation.md +++ b/docs/api/animation.md @@ -48,3 +48,24 @@ Returns a new source with a value always moving torwards the input source value. ::: warning Large periods or damping ratios can break the spring. ::: + + # tween + +A small TweenService wrapper that provides ergonomic tweening helpers and optional presets. + +This module is designed for UI animations (size, position, transparency, colour, etc.). It is safe to `require` in non-Roblox environments (it should fall back to applying goals instantly). + +## Exports + +- `vide.tween.tweenTo(instance, goals, tweenInfo?) -> Tween?` +- `vide.tween.tween(goals, tweenInfo?) -> Action` (optional, if you implemented the Action form) +- `vide.tween.presets` (optional) + +## tweenTo() + +Tweens an instance to a set of goal properties. + +### Type + +```lua +tweenTo(instance: Instance, goals: { [string]: any }, tweenInfo: TweenInfo?) -> Tween?