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
85
<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">
85
</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">Get access</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; }
}3Text Mask
Large text that works as a window onto a moving gradient - or onto an image set with an inline background-image. Class: fx-text-mask
SHINE
Explore
<div class="flex flex-wrap items-center justify-center gap-4 p-4 h-full" style="min-height:200px">
<div class="text-center">
<div class="display-3 font-bold leading-none fx-text-mask">
SHINE
</div>
<div class="display-5 font-bold leading-none fx-text-mask" style="--fx-mask-img:initial;background-image:url(https://images.unsplash.com/photo-1601647998829-ee316a565aea?auto=format&fit=crop&w=1200&h=800&q=70)">
Explore
</div>
</div>
</div>
/* CSS (already in assets/css/effects.css) */
.fx-text-mask {
color: var(--wt-primary-ink);
background-image: var(--fx-mask-img, linear-gradient(135deg, var(--wt-primary) 0%, var(--wt-accent) 30%, var(--wt-secondary) 60%, var(--wt-primary) 100%));
background-size: cover; background-position: 0% 50%;
-webkit-background-clip: text; background-clip: text;
-webkit-text-fill-color: transparent;
animation: fx-text-mask-pan 10s ease-in-out infinite alternate;
}
.fx-text-mask:not([style*="--fx-mask-img"]) { background-size: 300% 300%; }
@keyframes fx-text-mask-pan { to { background-position: 100% 50%; } }
@media (prefers-reduced-motion: reduce) {
.fx-text-mask, .fx-text-mask::before, .fx-text-mask::after, .fx-text-mask *, .fx-text-mask *::before, .fx-text-mask *::after { animation: none !important; transition: none !important; }
}