# `Alaja.Components.AnimatedBar`
[🔗](https://github.com/Lorenzo-SF/alaja/blob/2.1.0/lib/alaja/components/animated_bar.ex#L1)

Animated bar component with embedded animation in the filled portion.

Renders a progress bar where the filled portion displays a moving
animation pattern while the empty portion stays static. The bar
size is fixed based on value/max ratio, and the animation runs
indefinitely.

## Animation types

- `:spinner` — spinner characters cycle through the filled portion
- `:kitt` — a bright scanner spot moves back-and-forth across the filled portion with gradient
- `:pulse` — the filled portion pulses in intensity
- `:wave` — a wave-like pattern moves through the filled portion
- `:rainbow` — colors cycle through the filled portion

# `render_frame`

```elixir
@spec render_frame(number(), number(), non_neg_integer(), keyword()) ::
  Alaja.Buffer.t()
```

Renders a single frame of the animated bar as an `Alaja.Buffer.t/0`.

## Options

- `:animation` — animation type (`:spinner`, `:kitt`, `:pulse`, `:wave`, `:rainbow`; default `:spinner`)
- `:width` — total bar width in chars (default: 40)
- `:filled_char` — char for filled portion (default: "▓")
- `:empty_char` — char for empty portion (default: "░")
- `:filled_color` — RGB tuple for filled portion color
- `:empty_color` — RGB tuple for empty portion color
- `:animation_color` — RGB tuple for the animation highlight
- `:label` — optional label text before the bar
- `:show_percent` — show percentage at end (default: true)

# `run_infinite`

```elixir
@spec run_infinite(number(), number(), keyword()) :: :ok
```

Runs the animated bar in a loop until the process receives
a shutdown signal, the user presses Ctrl+C, or the maximum
number of iterations is reached.

## Options

- `:max_iterations` — safety limit to prevent infinite loops (default: 100_000)

---

*Consult [api-reference.md](api-reference.md) for complete listing*
