pixelcoda / content-gsap-animation
TYPO3 CMS extension for GSAP ScrollTrigger animations on content elements with editor presets, backend preview, Bootstrap Package support and headless-ready animation data.
Package info
github.com/CasianBlanaru/pixelcoda-content-gsap-animation
Type:typo3-cms-extension
pkg:composer/pixelcoda/content-gsap-animation
Requires
- php: >=8.2.0
- typo3/cms-core: ^12.4 || ^13.4 || ^14.3
Requires (Dev)
- b13/container: ^3.1.0
- bk2k/bootstrap-package: ^15.0.0
- friendsofphp/php-cs-fixer: ^3.64
- friendsoftypo3/phpstan-typo3: ^0.9.0
- overtrue/phplint: ^9.0
- phpstan/phpstan: ^1.10
- phpstan/phpstan-deprecation-rules: ^1.1
- phpstan/phpstan-phpunit: ^1.3
- phpstan/phpstan-strict-rules: ^1.5
- typo3/cms-backend: ^13.4 || ^14.3
- typo3/cms-belog: ^13.4 || ^14.3
- typo3/cms-extbase: ^13.4 || ^14.3
- typo3/cms-extensionmanager: ^13.4 || ^14.3
- typo3/cms-felogin: ^13.4 || ^14.3
- typo3/cms-filelist: ^13.4 || ^14.3
- typo3/cms-fluid: ^13.4 || ^14.3
- typo3/cms-form: ^13.4 || ^14.3
- typo3/cms-frontend: ^13.4 || ^14.3
- typo3/cms-indexed-search: ^13.4
- typo3/cms-info: ^13.4 || ^14.3
- typo3/cms-install: ^13.4 || ^14.3
- typo3/cms-introduction: ^4.7
- typo3/cms-lowlevel: ^13.4 || ^14.3
- typo3/cms-rte-ckeditor: ^13.4 || ^14.3
- typo3/cms-seo: ^13.4 || ^14.3
- typo3/cms-tstemplate: ^13.4 || ^14.3
- typo3/cms-workspaces: ^13.4 || ^14.3
- typo3/testing-framework: ^9.5
README
GSAP-powered scroll animations for TYPO3 content elements. Editors choose an animation in the content element form; the extension renders the required data-gsap-* attributes and initializes GSAP ScrollTrigger in the frontend.
Highlights
- TYPO3 12.4, 13.4 and 14.3+ compatible within the TYPO3 14 release line
- Fluid Styled Content support
- Bootstrap Package v13, v14 and v15 support
- Fade, slide, zoom and flip animation presets
- Backend preview with duration, delay and easing support
- Full-width premium backend preview with readable dark-mode styling, GSAP GIF preset examples and automatic headless-output indicator
- Extended settings for offset, anchor placement, once and mirror behavior
- BITV-friendly behavior via
prefers-reduced-motion - Headless-ready structured animation data for custom renderers and APIs
- Local vendored GSAP and ScrollTrigger assets, no CDN dependency
Installation
composer require pixelcoda/content-gsap-animation
Then run TYPO3 extension setup:
vendor/bin/typo3 extension:setup
TYPO3 Setup
For TYPO3 13 and TYPO3 14 projects using Site Sets, add the Site Set dependency:
dependencies: - pixelcoda/content-gsap-animation
For classic TypoScript templates, include the matching setup for your rendering stack:
Content GSAP Animation: Fluid Styled ContentContent GSAP Animation: Bootstrap Package v13.xContent GSAP Animation: Bootstrap Package v14.xContent GSAP Animation: Bootstrap Package v15.x
The Bootstrap Package number refers to the Bootstrap Package major version, not the TYPO3 major version.
Editor Usage
Open a content element and use the Animation tab. Select an animation preset and adjust timing. If extended settings are enabled in the extension configuration, editors can also set offset, anchor placement, once and mirror behavior.
The backend preview shows the selected animation on a content-card mockup and displays GIF examples for common presets such as fade, slide, zoom and flip. This helps editors compare the animation possibilities without leaving the form.
Documentation media:
- Original TYPO3 backend settings flow GIF
- Styled frontend demo
- Lighthouse 100 report
- Static premium preview
- Animation tab
- Extended settings
- Footer label
Lighthouse
Verified on the local TYPO3 test page with an animated content element and bundled GSAP assets:
- Performance: 100
- Accessibility: 100
- Best Practices: 100
- SEO: 100
- FCP: 1.2 s
- LCP: 1.7 s
- TBT: 20 ms
- CLS: 0
Accessibility
The frontend script respects prefers-reduced-motion: reduce. If the visitor has reduced motion enabled, animation attributes are ignored and elements remain visible without transform or opacity animation.
Headless Usage
Headless is not an editor setting and there is no toggle to enable it in the content element form. The extension always exposes structured animation data when the data processor is used by the selected TypoScript setup.
The data processor exposes both rendered HTML attributes and structured animation data:
animationSettings: raw HTML attribute string for Fluid layoutsgsapAnimationSettings: legacy raw HTML attribute stringanimationSettingsData: structured array for headless/API usagegsapAnimationSettingsData: legacy structured array alias
Example structured data:
{
"animation": "fade-up",
"duration": 800,
"delay": 0,
"easing": "power2.out",
"offset": 120,
"anchorPlacement": "top-center",
"once": true,
"mirror": false
}
Custom Fluid layouts can keep using:
{f:if(condition: animationSettings, then: '{animationSettings -> f:format.raw()}')}
Headless renderers should consume animationSettingsData and decide in the frontend application whether to use GSAP, native CSS, framework-native animation or no animation. Keep the reduced-motion decision in the frontend so API responses stay presentation-neutral.
In short: editors only choose the animation. Integrators consume animationSettingsData in custom Fluid layouts, JSON responses, API resources or headless frontend adapters.
Development
Install PHP dependencies:
composer update --prefer-dist
Build JavaScript bundles:
cd Resources/Public
yarn install
yarn build
Run checks:
composer test
composer test:functional
Functional tests require TYPO3 Testing Framework database credentials. With DDEV, use root credentials so the test runner can create temporary databases.
Documentation
Full documentation is shipped with the extension:
https://github.com/CasianBlanaru/pixelcoda-content-gsap-animation/tree/main/Documentation
The TYPO3 documentation URL can be enabled once docs.typo3.org has indexed the package.