Skip to content

Ring loading indicator in React

A spinning ring with a colored segment, alongside a loading text.

Here is an excerpt of this component's code in React. The full code is free for members, ready to copy into your project.

This component also comes in

Open in a new tab

The code in React

RingLoader.tsx
export function RingLoader() {
  return (
    <div role="status" className="flex items-center justify-center gap-3.5 font-semibold">
      <span
        aria-hidden="true"
        className="size-8 animate-spin rounded-full border-4 border-[#dbe6ff] border-t-blue-700 [animation-duration:0.8s] motion-reduce:[animation-duration:2.4s] dark:border-[#1a2a52] dark:border-t-[#93b4ff]"
      ></span>
      <span>Chargement des factures…</span>
    </div>
  );
}

Free component: copy it freely, including for commercial projects.

Loaders components in React
  • Three dots bouncing one after another, for a short wait or a message being typed.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component
  • A button's state while a form is submitting: a small spinner and a "Sending" label.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component
  • A thin bar where a segment slides continuously, for a load of unknown duration.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component