components

Tailwind CSS Loading

The loading animation visually indicates that a process is currently in progress.

Class Name
Type
Description
loadingComponentBase class for loading component.
loading-spinnerStyleShows the spinner animation.
loading-dotsStyleShows the dots animation.
loading-ringStyleShows the ring animation.
loading-ballStyleShows the ball animation.
loading-barsStyleShows the bars animation.
loading-infinityStyleShows the infinity animation.
loading-xsSizeMakes the loading component extra small.
loading-smSizeMakes the loading component small.
loading-mdSizeMakes the loading component medium(default).
loading-lgSizeMakes the loading component large.
loading-xlSizeMakes the loading component extra-large.

The standard format for loading is component class loading, accompanied by modifier class loading-spinner to show the spinner animation. The size of the spinner can be adjusted using the responsive classes loading-{size} where {size} can be xs, sm, md, lg or xl.

Use the modifier class loading-dots for loading with dots animation.

Use the modifier class loading-ring for loading with growing rings animation.

Use the modifier class loading-ball for loading with jumping balls animation.

Use the modifier class loading-bars for loading with bars animation.

Use the modifier class loading-infinity for loading with infinity animation.

Utilize the text utility class text-{semantic-color} to create loading animations with different colors, each corresponding to specific modifiers.

Below are the examples illustrating the integration of loading animations within buttons.

Below are the examples illustrating the integration of loading animations within alerts.

Below is the example illustrating the integration of loading animations within cards.