Skip to main content

loading_indicator

Function loading_indicator 

Source
pub fn loading_indicator(icon_set: &str) -> Option<AnimatedIcon>
Expand description

Return the loading/spinner animation for the given icon set.

This is the animated-icon counterpart of load_icon(). It resolves icon_set to an IconSet via IconSet::from_name(), falling back to system_icon_set() for unrecognized names, then dispatches to the appropriate bundled spinner data.

§Dispatch

  • "material"progress_activity.svg with continuous spin transform (1000ms)
  • "lucide"loader.svg with continuous spin transform (1000ms)
  • "freedesktop" – loads process-working sprite sheet from active icon theme
  • Unknown set – None

§Examples

// Result depends on enabled features and platform
let anim = native_theme::loading_indicator("lucide");