Created
December 27, 2023 18:25
-
-
Save benbjurstrom/e6978a12a2ce08459756f53e47e66e24 to your computer and use it in GitHub Desktop.
Laravel Blade Image Component
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div @class(['overflow-hidden', $class])> | |
<div | |
class="blur-lg bg-cover bg-no-repeat" | |
style="background-image: url('{{$placeholder}}');" | |
> | |
<img | |
:key="{{$id}}" | |
class="h-full w-full transition duration-200 ease-in opacity-0" | |
src="{{$src}}" | |
onload="this.classList.remove('opacity-0'); | |
this.parentNode.classList.remove('blur-lg');" | |
> | |
</div> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment