spinner
Types
Constants
pub const clock_frames: List(String) = [
"๐", "๐", "๐", "๐", "๐", "๐", "๐", "๐",
"๐", "๐", "๐", "๐",
]
pub const half_circle_frames: List(String) = [
"โ", "โ", "โ", "โ",
]
pub const moon_frames: List(String) = [
"๐", "๐", "๐", "๐", "๐", "๐", "๐", "๐",
]
pub const negative_dots_frames: List(String) = [
"โฃพ", "โฃฝ", "โฃป", "โขฟ", "โกฟ", "โฃ", "โฃฏ", "โฃท",
]
pub const snake_frames: List(String) = [
"โ ", "โ ", "โ น", "โ ธ", "โ ผ", "โ ด", "โ ฆ", "โ ง", "โ ",
"โ ",
]
pub const triangle_frames: List(String) = [
"โข", "โฃ", "โค", "โฅ",
]
pub const walking_frames: List(String) = [
"โข", "โข", "โข", "โก", "โก", "โก", "โก ",
]
Functions
pub fn new(text: String) -> Builder
Start a spinner that runs concurrently in another Erlang process or JavaScript task.
pub fn set_colour(
spinner: Spinner,
colour: fn(String) -> String,
) -> Nil
pub fn stop(spinner: Spinner) -> Nil
Stop the spinner.
This should be called before your program ends to re-enable the terminal cursor.
pub fn with_colour(
builder: Builder,
colour: fn(String) -> String,
) -> Builder
pub fn with_frames(
builder: Builder,
frames: List(String),
) -> Builder