components
Tailwind CSS Loading
The loading animation visually indicates that a process is currently in progress.
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.
Primary alert: Welcome to our platform! Explore our latest features and updates.
Success alert: Explore our recent achievements and upcoming events.
Below is the example illustrating the integration of loading animations within cards.
Card title
This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.