Skip to content

Submitting button in Tailwind CSS

A button's state while a form is submitting: a small spinner and a "Sending" label.

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

index.html
<!doctype html>
<html lang="fr">
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <title>Bouton en cours d'envoi</title>
    <script src="https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4.3.3"></script>
    <style type="text/tailwindcss">
      @custom-variant dark {
        @media (prefers-color-scheme: dark) {
          &:where(:root:not([data-theme="light"]), :root:not([data-theme="light"]) *) {
            @slot;

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

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

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

    • Tailwind
    • React
    • CSS
    • WordPress
    Component
  • A spinning ring with a colored segment, alongside a loading text.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component