LineaUI.Components.Progress (linea_ui v0.1.1)

Copy Markdown View Source

LineOne's linear progress bar, solid or soft, in every size, with the active shimmer or the indeterminate slide.

<.progress value={42} />
<.progress value={70} color="success" variant="soft" />
<.progress value={50} color="primary" active />
<.progress indeterminate color="info" size="sm" />
<.progress value={30} color="warning" variant="soft" height="1.5" />
<.progress value={60} color="white" />

value is read against max (100 by default) and updates with the assign.

Summary

Functions

Renders a progress bar.

Functions

progress(assigns)

Renders a progress bar.

<.progress value={@uploaded} max={@total} color="success" variant="soft" active />

Attributes

  • value (:any) - A number between 0 and max. Defaults to 0.
  • max (:any) - Defaults to 100.
  • color (:string) - The bar's color; white is a white bar on a translucent track, for colored cards. Defaults to "neutral". Must be one of "neutral", "primary", "secondary", "info", "success", "warning", "error", or "white".
  • variant (:string) - soft tints the track with the bar's color (bg-{color}/15); solid uses the gray track. Defaults to "solid". Must be one of "solid", or "soft".
  • size (:string) - Defaults to "md". Must be one of "sm", "md", "lg", or "xl".
  • height (:string) - A Tailwind height step (h-1, h-1.5...) that wins over size; 1.5 is the one size lacks. Defaults to nil. Must be one of nil, "1", "1.5", "2", "3", or "4".
  • active (:boolean) - A light sweeping over the bar. Defaults to false.
  • indeterminate (:boolean) - A bar sliding across the track, when the end is not known. Defaults to false.
  • label (:string) - The aria-label of the progress bar. Defaults to nil.
  • class (:any) - Defaults to nil.
  • bar_class (:any) - Defaults to nil.
  • Global attributes are accepted.