Modern CSS Gradient Effects
Animated, mesh, conic and text gradients built from the theme colours.
1Conic Rotation
A spinning conic gradient behind round content such as avatars, scores or loaders. Class: fx-conic-rotation
91
<div class="flex flex-wrap items-center justify-center gap-4 p-4 h-full" style="min-height:200px">
<div class="fx-conic-rotation">
<img src="../assets/img/avatar-8.svg" alt="Profile with a spinning ring" class="object-cover" style="width:96px;height:96px">
</div>
<div class="fx-conic-rotation">
<div class="bg-page grid font-bold text-xl" style="width:96px;height:96px;place-items:center">
91
</div>
</div>
</div>
/* CSS (already in assets/css/effects.css) */
.fx-conic-rotation { position: relative; isolation: isolate; overflow: hidden; border-radius: 50%; padding: 5px; }
.fx-conic-rotation::before {
content: ""; position: absolute; inset: -30%; z-index: -1;
background: conic-gradient(var(--wt-primary), var(--wt-accent), var(--wt-secondary), var(--wt-primary));
animation: fx-conic-rotation-spin 3s linear infinite;
}
.fx-conic-rotation > * { display: block; border-radius: 50%; }
@keyframes fx-conic-rotation-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
.fx-conic-rotation, .fx-conic-rotation::before, .fx-conic-rotation::after, .fx-conic-rotation *, .fx-conic-rotation *::before, .fx-conic-rotation *::after { animation: none !important; transition: none !important; }
}2Shimmer Effect
A diagonal light sweep that glides across buttons, cards or images every few seconds. Class: fx-shimmer-effect
<div class="flex flex-wrap items-center justify-center gap-4 p-4 h-full" style="min-height:200px">
<button type="button" class="btn btn-primary btn-lg fx-shimmer-effect">Claim offer</button>
<div class="fx-shimmer-effect rounded-lg">
<img src="../assets/img/product-2.svg" alt="Shiny product" class="block object-cover" style="width:110px;height:110px">
</div>
</div>
/* CSS (already in assets/css/effects.css) */
.fx-shimmer-effect { position: relative; overflow: hidden; isolation: isolate; }
.fx-shimmer-effect::after {
content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 60%; pointer-events: none;
background: linear-gradient(110deg, transparent 20%, rgba(255, 255, 255, .55) 50%, transparent 80%);
transform: translateX(-120%);
animation: fx-shimmer-effect-sweep 3.2s ease-in-out infinite;
}
@keyframes fx-shimmer-effect-sweep { 0% { transform: translateX(-120%); } 45%, 100% { transform: translateX(260%); } }
@media (prefers-reduced-motion: reduce) {
.fx-shimmer-effect, .fx-shimmer-effect::before, .fx-shimmer-effect::after, .fx-shimmer-effect *, .fx-shimmer-effect *::before, .fx-shimmer-effect *::after { animation: none !important; transition: none !important; }
}