DEV Community

Discussion on: Build a Pixel Perfect Skeleton Loader Using CSS 🚀

Collapse
yaxx profile image
yaxx

Nice one, but how do you determine the number of skeletons to display compare to the number of incoming data

Collapse
rammcodes profile image
Ram Maheshwari 💚 Author

It's up to you on how many Skeletons you wanna display and if you have pagination like you only show n number of items then you can show n number of skeleton screens.

Collapse
yaxx profile image
yaxx

I will personally render the skeletons just enough to fill the items view port even though the number of incoming items are greater, less than or equal to the number of pre-rendered skeletons.

Thread Thread
rammcodes profile image
Ram Maheshwari 💚 Author

That's a great idea, I will keep that in mind and hopefully will implement enough skeletons to fit the viewport/layout. Thanks a lot for sharing 😄