forked from Vijaykv5/SnapGrid
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added Shimmer Loading to images card
- Loading branch information
Veer Prakash
authored and
Veer Prakash
committed
Oct 1, 2023
1 parent
9da6c30
commit 4c2b4f7
Showing
2 changed files
with
65 additions
and
50 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
const ShimmerLoading = () => { | ||
return ( | ||
<div className="animate-pulse"> | ||
<div className="relative"> | ||
<div className="bg-gradient-to-r from-gray-200 to-gray-300 h-96 animate-pulse"></div> | ||
<div className="absolute top-0 left-0 p-4 text-white max-w-2xl"></div> | ||
</div> | ||
|
||
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-10 p-5 mt-5"> | ||
{[1, 2, 3, 4, 5, 6, 7, 8].map((index) => ( | ||
<div | ||
key={index} | ||
className="relative group w-full md:w-80 h-72 rounded-md overflow-hidden shadow-l" | ||
> | ||
<div className="bg-gradient-to-r from-gray-200 to-gray-300 animate-pulse h-full w-full"></div> | ||
<div className="absolute inset-0 flex items-center justify-center opacity-0 group-hover:opacity-100 backdrop-blur-sm"></div> | ||
</div> | ||
))} | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default ShimmerLoading; |