Skip to content

Ring loading indicator in HTML and CSS

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

Here is an excerpt of this component's code in HTML and CSS. 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 HTML and CSS

index.html
<!doctype html>
<html lang="fr">
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <title>Indicateur de chargement en anneau</title>
    <link rel="stylesheet" href="style.css" />
  </head>
  <body>
    <main class="demo">
      <div class="ring" role="status">
        <span class="ring__spinner" aria-hidden="true"></span>
style.css
:root {
  --ring-track: #dbe6ff;
  --ring-fill: #1d4ed8;
  --ring-text: #0b1b3a;
  --demo-bg: #f8faff;
  --demo-text: #0b1b3a;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ring-track: #1a2a52;
    --ring-fill: #93b4ff;

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

Loaders components in HTML and CSS
  • 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