Skip to content

feat(gsap): expose innerText counter animations in GSAP inspector panel#1244

Merged
miguel-heygen merged 1 commit into
mainfrom
feat/gsap-innertext-counter
Jun 6, 2026
Merged

feat(gsap): expose innerText counter animations in GSAP inspector panel#1244
miguel-heygen merged 1 commit into
mainfrom
feat/gsap-innertext-counter

Conversation

@miguel-heygen
Copy link
Copy Markdown
Collaborator

Summary

Resolves #1179

Users can now edit number roll-up (count-up) animations via the GSAP inspector panel. Previously, innerText tweens were silently invisible to the inspector — the animation ran but you couldn't change the end value or speed from the UI.

What changed

  • packages/core/src/parsers/gsapConstants.ts: Added "innerText" to SUPPORTED_PROPS
  • packages/studio/src/components/editor/gsapAnimationConstants.ts:
    • Label: Counter Value
    • Tooltip: End value for a number roll-up (the number it counts up/down to)
    • Constraint: step: 1 (integers only)

How it works

gsap.to(el, { innerText: 80_000_000_000, snap: { innerText: 1 }, duration: 2 })
  • innerText: 80e9 → editable as Counter Value in the inspector
  • snap: { innerText: 1 } → preserved verbatim via EXTRAS_KEYS, no UI change needed
  • Speed → already editable via Duration

No GSAP plugin required — plain DOM property tweening.

…tions

Adds 'innerText' as a supported GSAP property so number roll-up animations
(count-up from 0 to some value) are visible and editable in the GSAP inspector
panel.

- Add 'innerText' to SUPPORTED_PROPS in gsapConstants.ts
- Add label 'Counter Value', tooltip, and step constraint (1) in
  gsapAnimationConstants.ts

The snap modifier that controls integer rounding is already preserved
verbatim via the EXTRAS_KEYS round-trip, so rounding behavior survives
edits without any additional UI changes.

Closes #1179
@miguel-heygen miguel-heygen force-pushed the feat/gsap-innertext-counter branch from 50b5af4 to 283be29 Compare June 6, 2026 20:39
@miguel-heygen miguel-heygen merged commit 05aac94 into main Jun 6, 2026
46 checks passed
@miguel-heygen miguel-heygen deleted the feat/gsap-innertext-counter branch June 6, 2026 21:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow editing motion graphics via the inspector

1 participant