A coin with a rim and a highlight, flipping on its vertical axis with perspective. Natural for payments, checkout and anything that involves money.
Also known as: spinning coin, flipping coin.
<div class="ldr-coin-flip" role="status" aria-label="Loading"></div>
.ldr-coin-flip {
--s: var(--ldr-size, 48px);
--c: var(--ldr-color, #3b82f6);
display: grid;
place-items: center;
width: var(--s);
height: var(--s);
border-radius: 50%;
background: radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.55), transparent 45%), var(--c);
box-shadow: inset 0 0 0 calc(var(--s) / 12) color-mix(in srgb, var(--c) 70%, #000);
font: 700 calc(var(--s) / 2) system-ui, sans-serif;
color: #fff;
animation: ldr-coin-flip-spin 1.4s ease-in-out infinite;
}
.ldr-coin-flip::before {
content: "$";
}
@keyframes ldr-coin-flip-spin {
from { transform: perspective(200px) rotateY(0deg); }
to { transform: perspective(200px) rotateY(360deg); }
}
@media (prefers-reduced-motion: reduce) {
.ldr-coin-flip, .ldr-coin-flip *, .ldr-coin-flip::before, .ldr-coin-flip::after {
animation-duration: 3s;
}
}--ldr-color on the element or a parent.
Currently previewing #3b82f6.--ldr-size. Every dimension in the snippet is
derived from it. Currently previewing 64px.animation shorthand.
Delays on the children are relative, so they keep their rhythm.role="status" and an
aria-label so screen readers announce the wait. The reduced-motion rule
at the end slows the animation for users who asked for less motion.