Raxol.UI.Components.Progress.Spinner (Raxol v2.0.1)
View SourceAnimated spinner component for terminal UIs.
Provides various spinner animations for loading states.
Summary
Functions
Convenience function for creating an error spinner.
Gets the frames for a specific spinner type.
Handles frame events (for compatibility with some tests).
Initializes spinner state.
Convenience function for creating a loading spinner.
Convenience function for creating a processing spinner.
Convenience function for creating a saving spinner.
Creates an animated spinner.
Returns available spinner types.
Updates spinner state.
Types
@type state() :: %{ style: atom(), frames: [String.t()], frame_index: non_neg_integer(), color_index: non_neg_integer(), colors: [atom()], speed: non_neg_integer(), text: String.t() | nil, text_position: atom(), last_update: integer() }
Functions
Convenience function for creating an error spinner.
Gets the frames for a specific spinner type.
Handles frame events (for compatibility with some tests).
Initializes spinner state.
@spec loading() :: state()
Convenience function for creating a loading spinner.
Convenience function for creating a processing spinner.
@spec saving() :: state()
Convenience function for creating a saving spinner.
Creates an animated spinner.
Parameters
message- Optional message to display next to spinnerframe- Current animation frame numberopts- Options including :type for spinner style
@spec types() :: [atom()]
Returns available spinner types.
Updates spinner state.