bertux77/laravel-inview-animations
Laravel package for in-view animations using IntersectionObserver. Add a Blade component to auto-load CSS/JS, then animate elements via data-anim on .reveal with delays/duration. Includes many reveal effects plus animated counters and progress/ring charts for dashboards and landing pages.
IntersectionObserver, making it ideal for Landing Pages, Portfolios, or Dashboards where visual engagement is critical. It aligns well with SPA-like behavior in Laravel Blade templates without requiring full frontend frameworks (e.g., Vue/React).IntersectionObserver polyfills if needed).{{-- @inview --}} directives).IntersectionObserver is supported in modern browsers but may need polyfills for legacy support (e.g., IE11). Risk: Low if targeting evergreen browsers; Medium for older stacks.x-inview vs @inview).IntersectionObserver with scroll events if polyfills fail.| Component | Compatibility Notes |
|---|---|
| Laravel | Works with Blade templates; no core changes needed. |
| JavaScript | Vanilla JS preferred; conflicts unlikely if no other IntersectionObserver usage. |
| CSS Frameworks | Tailwind recommended; custom CSS requires manual tuning. |
| Build Tools | Vite/Webpack: Ensure JS is bundled. Laravel Mix: May need manual config. |
| Legacy Browsers | Polyfill required for IE11 (e.g., intersection-observer npm package). |
composer require bertux77/laravel-inview-animations.php artisan vendor:publish --provider="Bertux77\InviewAnimations\InviewAnimationsServiceProvider".{{-- Reveal animation --}}
@inview('.hero', 'fadeInUp')
{{-- Counter animation --}}
@inview('.counter', 'countUp')
resources/css/animations.css) or use Tailwind.README.md within the project./* resources/css/animations.css */
@keyframes fadeInUp {
from { opacity: 0; transform: translateY(20px); }
to { opacity: 1; transform: translateY(0); }
}
IntersectionObserver polyfill or incorrect selectors.IntersectionObserver polyfill.will-change: transform sparingly.| Issue Type | Owner | Resolution Time |
|---|---|---|
| CSS Styling | Frontend Developer | <1 hour |
| JS Errors | Full-Stack Engineer | <2 hours |
| Performance | Frontend/Ops | 1–3 days (optimization) |
| Browser Compatibility | DevOps | 1–2 days (polyfills) |
| Failure Scenario | Impact | Mitigation Strategy |
|---|---|---|
| JavaScript Disabled | Animations fail; static content remains. | Provide semantic fallbacks (e.g., visible counters). |
IntersectionObserver Unavailable |
Animations broken in legacy browsers. | Polyfill + graceful degradation (e.g., static images). |
| CSS Animation Bugs | Visual glitches (e.g., flickering). | Test in multiple browsers; use |
How can I help you explore Laravel packages today?