View Source KinoProgressBar (KinoProgressBar v0.1.0)

Documentation for KinoProgressBar.

Summary

Functions

Create a new progress bar.

Update the current value of the progress bar.

Functions

Create a new progress bar.

Options:

  • range: The range of values for the progress bar. Defaults to {0, 100}.

  • current: Current value. Defaults to 0.

  • width: The width of the progress bar in pixels. Defaults to 600.

  • format_current: How to display the current value. Defaults to appending a percent symbol.

  • color: The color scheme for the current bar. Defaults to :blue. Possible values: :red, :blue, :gray, :green, {:color, CSS_COLOR_STRING}.

  • throttle: Elixir can handle 10_000 messages per second without issue, but browsers react poorly if you try to update the DOM 10_000 times per second. So, this kino throttles the rate at which client updates are sent to at most one every throttle milliseconds. The default is 500, so at most two updates are sent per second.

Link to this function

set_current(kino, current)

View Source

Update the current value of the progress bar.

This is throttled per the throttle parameter set when the progress bar was created.