#terminal #spinner #animation #loading #showing #stop #spinner-builder

terminal-spinners

A library for showing terminal loading animations

9 releases

0.3.2 Dec 20, 2021
0.3.1 Mar 15, 2021
0.2.1 Mar 13, 2021
0.1.3 Mar 12, 2021

#1 in #showing

Download history 127/week @ 2024-07-20 130/week @ 2024-07-27 72/week @ 2024-08-03 152/week @ 2024-08-10 100/week @ 2024-08-17 48/week @ 2024-08-24 90/week @ 2024-08-31 107/week @ 2024-09-07 76/week @ 2024-09-14 121/week @ 2024-09-21 89/week @ 2024-09-28 77/week @ 2024-10-05 82/week @ 2024-10-12 90/week @ 2024-10-19 130/week @ 2024-10-26 72/week @ 2024-11-02

403 downloads per month
Used in 6 crates

Apache-2.0 OR MIT

29KB
223 lines

terminal-spinners

A Rust library for showing terminal loading animations.

Usage

use terminal_spinners::{SpinnerBuilder, DOTS};

let handle = SpinnerBuilder::new().spinner(&DOTS).text("Loading unicorns").start();
// Do some other work...
std::thread::sleep(std::time::Duration::from_secs(3));
handle.done();

The examples/ directory contains an example for each available spinner. To see them in action, run cargo run --example <name>. Additional examples for showcasing other functionality are:

Filename Desc
clear_line Showcases SpinnerHandle::stop_and_clear

Shortcomings

  • It's not possible to run multiple spinners at once. This probably needs an API change. Open for help/PR!

License

Licensed under either of Apache License, Version 2.0 or MIT license at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Dependencies

~1.6–2.3MB
~40K SLoC