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-spinnerModifierShows the spinner animation.
loading-dotsModifierShows the dots animation.
loading-ringModifierShows the ring animation.
loading-ballModifierShows the ball animation.
loading-barsModifierShows the bars animation.
loading-infinityModifierShows the infinity animation.
loading-xsResponsiveMakes the loading component extra small.
loading-smResponsiveMakes the loading component small.
loading-lgResponsiveMakes the loading component large.
text-{semantic-color}UtilityUse to create loading with different colors.

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, or lg.

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-dots for loading with bars animation.

Use the modifier class loading-dots 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.