Keyframe animations for cards, icons, loaders and headings - drop a class on an element and it comes alive.
1Gradient Wave
A banner whose theme gradient flows sideways while a soft wave rolls along its bottom edge. Class: fx-gradient-wave
<div class="d-flex flex-wrap align-items-center justify-content-center gap-3 p-3 h-100" style="min-height:200px">
<div class="fx-gradient-wave rounded-4 p-4 w-100" style="max-width:19rem">
<p class="small text-uppercase fw-semibold mb-1 opacity-75">New season</p>
<h3 class="h4 fw-bold mb-3">Seasonal menus from local farms</h3>
<a href="#" class="btn btn-light btn-sm">Explore</a>
</div>
</div>
/* CSS (already in assets/css/effects.css) */
.fx-gradient-wave {
position: relative; overflow: hidden; color: var(--wt-on-primary, #fff);
background: linear-gradient(90deg, var(--wt-primary), var(--wt-secondary), var(--wt-accent), var(--wt-primary));
background-size: 200% 100%;
animation: fx-gradient-wave-flow 8s linear infinite;
}
.fx-gradient-wave::after {
content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 24px; pointer-events: none;
background: radial-gradient(20px 12px at 50% 100%, rgba(255, 255, 255, .35) 98%, transparent 100%) 0 100% / 40px 24px repeat-x;
animation: fx-gradient-wave-roll 2.4s linear infinite;
}
.fx-gradient-wave > * { position: relative; z-index: 1; }
@keyframes fx-gradient-wave-flow { to { background-position: -200% 0; } }
@keyframes fx-gradient-wave-roll { to { background-position: 40px 100%; } }
@media (prefers-reduced-motion: reduce) {
.fx-gradient-wave, .fx-gradient-wave::before, .fx-gradient-wave::after, .fx-gradient-wave *, .fx-gradient-wave *::before, .fx-gradient-wave *::after { animation: none !important; transition: none !important; }
}2Typewriter
Types a single line of monospace text letter by letter with a blinking caret; set --fx-ch to the character count. Class: fx-typewriter
terminal
Welcome aboard<div class="d-flex flex-wrap align-items-center justify-content-center gap-3 p-3 h-100" style="min-height:200px">
<div class="bg-dark text-white rounded-3 p-3 w-100" style="max-width:18rem">
<div class="small text-white-50 mb-1">
terminal
</div>
<span class="fx-typewriter" style="--fx-ch:14">Welcome aboard</span>
</div>
</div>
/* CSS (already in assets/css/effects.css) */
.fx-typewriter {
display: inline-block; max-width: 100%; overflow: hidden; white-space: nowrap; vertical-align: bottom;
font-family: var(--ui-font-monospace, monospace);
width: calc(var(--fx-ch, 20) * 1ch + .15em);
border-right: .12em solid var(--wt-primary);
animation: fx-typewriter-type 4.5s steps(var(--fx-ch, 20)) infinite, fx-typewriter-caret .8s step-end infinite;
}
@keyframes fx-typewriter-type { 0% { width: 0; } 65%, 100% { width: calc(var(--fx-ch, 20) * 1ch + .15em); } }
@keyframes fx-typewriter-caret { 50% { border-color: transparent; } }
@media (prefers-reduced-motion: reduce) {
.fx-typewriter, .fx-typewriter::before, .fx-typewriter::after, .fx-typewriter *, .fx-typewriter *::before, .fx-typewriter *::after { animation: none !important; transition: none !important; }
}3Heartbeat
A double-beat pulse for like buttons, favourite icons and notification badges. Class: fx-heartbeat
<div class="d-flex flex-wrap align-items-center justify-content-center gap-3 p-3 h-100" style="min-height:200px">
<span class="display-4 text-danger fx-heartbeat"><i class="bi bi-heart-fill" aria-hidden="true"></i></span>
<button type="button" class="btn btn-outline-danger rounded-pill"><span class="fx-heartbeat"><i class="bi bi-heart-fill" aria-hidden="true"></i></span> 946 likes</button>
</div>
/* CSS (already in assets/css/effects.css) */
.fx-heartbeat { display: inline-block; animation: fx-heartbeat-beat 1.5s ease-in-out infinite; transform-origin: center; }
@keyframes fx-heartbeat-beat {
0%, 40%, 100% { transform: scale(1); }
12% { transform: scale(1.2); }
24% { transform: scale(.96); }
32% { transform: scale(1.14); }
}
@media (prefers-reduced-motion: reduce) {
.fx-heartbeat, .fx-heartbeat::before, .fx-heartbeat::after, .fx-heartbeat *, .fx-heartbeat *::before, .fx-heartbeat *::after { animation: none !important; transition: none !important; }
}