Skip to content

Animated icons ​

An animated icon sits before the text. Pick one with icon="…".

spinner (default)
dots
bars
pulse
sparkle
orbit
globe
gear
none
html
<fun-loader icon="sparkle"></fun-loader>
iconLooks likeSuits
spinner (default)A ring with a gap, rotatingAnything
dotsThree dots bouncing in turnChat, typing-style waits
barsThree bars rising and falling in turnData, audio, finance
pulseA dot that grows and fades outCalm or sensitive moments, such as payments
sparkleA ✦ that twinkles and turnsAI and creative tools
orbitThree dots circling in 3D, larger in front and fading behindAI answers, long waits
globeA globe turning, its meridians sliding acrossSearching the web, translation, sending things abroad
gearA gear whose turns speed up and slow down, like a machine cyclingProcessing, settings, builds and reports
noneNo icon, text onlyInline text, or when you have your own spinner

An unknown name falls back to spinner, so a typo never leaves an empty gap.

To show the icon without any text, add icon-only. For the opposite, text without an icon, use icon="none".

Size and color ​

The icon is 1em square (orbit is a little wider, 1.3em), so it scales with the font size. It uses the text color unless you set --fun-loader-icon-color:

css
fun-loader {
  font-size: 1.25rem;
  --fun-loader-icon-color: #7c5cff;
}

More in Styling.

Motion ​

The icon stops while paused is set. When someone has asked their system for reduced motion, the icon fades gently in and out instead of spinning or bouncing. orbit keeps its three dots spread out while it fades.

Released under the MIT License.