Skip to content

Square Flip

A copy-paste spinners component in pure HTML & CSS. Zero dependencies, framework-agnostic, MIT-licensed.

SpinnersHTMLCSSany framework

Copy into your project

HTML
<!-- Square Flip Spinner -->
<div class="nuda-sqflip" role="status" aria-label="Loading">
  <div class="nuda-sqflip__face"></div>
</div>
CSS
/* Square Flip Spinner
   A 3D flipping square alternating axes.
   Customize: --sqflip-color, --sqflip-size */

.nuda-sqflip {
  --sqflip-color: #e4ff54;
  --sqflip-size: 28px;
  perspective: 200px;
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nuda-sqflip__face {
  width: var(--sqflip-size);
  height: var(--sqflip-size);
  background: var(--sqflip-color);
  border-radius: 4px;
  animation: nuda-sqflip 1.6s ease-in-out infinite;
  will-change: transform;
}

@keyframes nuda-sqflip {
  0%   { transform: rotateY(0)      rotateX(0); }
  50%  { transform: rotateY(180deg) rotateX(0); }
  100% { transform: rotateY(180deg) rotateX(180deg); }
}

@media (prefers-reduced-motion: reduce) {
  .nuda-sqflip__face { animation: none; opacity: 0.7; }
}

How to use Square Flip

Paste the HTML where you need it and the CSS into a global stylesheet (or a <style> tag). Every class is prefixed nuda- so it never collides with Tailwind or your own styles. Tweak the CSS custom properties to match your design system.

Works in React, Vue, Svelte, Astro, Next.js, Nuxt, Laravel Blade, Django, Rails — or a single .html file. No npm install, no build step.

More spinners components

← Browse all NudaUI components