Skeleton Loader CSS With Angular

Many of us hope to improve user experience by displaying loaders and spinners while users wait for a page to be loaded due to some server to client communication, promises to be resolved or basically any function waiting to be executed or data waiting to be retrieved from the server before finally rendering the page to the user.

I personally think skeleton screens give the illusion of “it’s almost about to show” while loaders and spinners make it feel like “it’s trying to show hopefully” that is why you find Facebook, Slack, LinkedIn and Co using skeleton screens.

The idea is, Whenever someone requests new content from the server, you can immediately start showing the skeleton, while data is being loaded in the background. Once the content is ready, simply swap the skeleton for the actual card. This can be done with plain vanilla JavaScript or using a library like Angular, React, Vue etc.

Now you could use an image to display the skeleton, but that would introduce an additional request and data overhead. We’re already loading stuff here, so it’s not a great idea to wait for another image to load first. Plus it’s not responsive, and if we ever decided to adjust some of the content card’s styling, we would have to duplicate the changes to the skeleton image so they’d match again.

Check Out What It Takes To Build A Successful App Here

What I observe is –

  • Skeleton screens are somewhat novel and attract more attention than the ubiquitous loading spinner.
  • Skeleton screens work better in familiar interfaces and can be off-putting in new settings when users don’t know what to expect.
  • Skeleton screens work best when wait times are very short.

Lets Code –

  • Create a new angular project, Add Bootstrap framework for faster & responsive design into the index.html file.
  • Do not forget to add BrowserAnimationsModule into app.module.ts ‘s “imports[]”.
  • Add the layout you want also it’s CSS.
  • CSS pseudo class – :empty pseudo can be used to preserve the loading effect on any of the layout elements without children. Children can be either element nodes or text (including whitespaces).






animation: loading 1.1s infinite linear;

background: #dedfe1;

background-image: -webkit-linear-gradient(to right, #dedfe1 0%, #f2f3f5 20%, #dedfe1 40%, #dedfe1 100%);

background-image: linear-gradient(to right, #dedfe1 0%, #f2f3f5 20%, #dedfe1 40%, #dedfe1 100%);

background-repeat: no-repeat;

  • Structural Derivative – *ngIf will be used to switch from the skeleton layout to the original layout once our asynchronous request has been fulfilled.
  • To get a loading effect on every element of our skeleton layout, we will make use of the linear-gradient CSS property which provides a smooth transition between colors. Angular provided a method called ‘transition()’.The transition() function accepts two arguments:

We Build Streamlining Accreditation Process For Physicians

The first argument accepts an expression that defines the animation states or the direction between two transition states, and the second argument is an array that accepts some set of parameters like animate(), style() e.t.c.The animate() is similar to the animate CSS property while style() will contain the CSS styles for the animation states.

  • Using CSS animation property and @keyframes rule will enable us to gradually change from a set of CSS styles to another. The @keyframes rule specifies the animation code. The animation is created by gradually changing from one set of CSS styles to another, you can change the set of CSS styles many times.
@keyframes loading {

0% {

background-position: -100px;


100% {

background-position: 200px;



Check out the stackblitz demo here –

StackBlitz Demo



I am hoping this article will help you to understand the aspects of skeleton screen loading animation. To discuss more about the concept of css skeleton loading, share your queries in the comment section.

Get Wide Array Of Angular JS Development Services Tailored To Your Needs


Tech Expert

I love building things and learning new stuff. Enjoying journey for the last few years as a software developer and creating better things. Industry experienced MEAN Stack Developer, Full Stack Developer, and BI Developer.

Get in touch for a detailed discussion.

Hear From Our 100+ Customers

Mindbowser helped us build an awesome iOS app to bring balance to people’s lives.


We had very close go live timeline and MindBowser team got us live a month before.

Shaz Khan
CEO, BuyNow WorldWide

They were a very responsive team! Extremely easy to communicate and work with!

Kristen M.
Founder & CEO, TotTech

We’ve had very little-to-no hiccups at all—it’s been a really pleasurable experience.

Chacko Thomas
Co-Founder, TEAM8s

Mindbowser is one of the reasons that our app is successful. These guys have been a great team.

Dave Dubier
Founder & CEO, MangoMirror

Mindbowser was very helpful with explaining the development process and started quickly on the project.

Hieu Le
Executive Director of Product Development, Innovation Lab

The greatest benefit we got from Mindbowser is the expertise. Their team has developed apps in all different industries with all types of social proofs.

Alex Gobel
Co-Founder, Vesica

Mindbowser is professional, efficient and thorough. 

MacKenzie R
Consultant at XPRIZE

Very committed, they create beautiful apps and are very benevolent. They have brilliant Ideas.

Laurie Mastrogiani
Founder, S.T.A.R.S of Wellness

MindBowser was great; they listened to us a lot and helped us hone in on the actual idea of the app.” “They had put together fantastic wireframes for us.

Bennet Gillogly
Co-Founder, Flat Earth

They're very tech-savvy, yet humble.

Uma Nidmarty
CEO, GS Advisorate, Inc.

Ayush was responsive and paired me with the best team member possible, to complete my complex vision and project. Could not be happier.

Katie Taylor
Founder, Child Life On Call

As a founder of a budding start-up, it has been a great experience working with Mindbower Inc under Ayush's leadership for our online digital platform design and development activity.

Radhika Kotwal
Founder of Courtyardly

The team from Mindbowser stayed on task, asked the right questions, and completed the required tasks in a timely fashion! Strong work team!

Michael Wright
Chief Executive Officer, SDOH2Health LLC

They are focused, patient and; they are innovative. Please give them a shot if you are looking for someone to partner with, you can go along with Mindbowser.

David Cain
CEO, thirty2give

We are a small non-profit on a budget and they were able to deliver their work at our prescribed budgets. Their team always met their objectives and I'm very happy with the end result. Thank you, Mindbowser team!!

Bart Mendel
Founder, Mindworks