LanternUI.Components.Loading (LanternUI v0.8.2)

Copy Markdown View Source

Inline loading indicator — ring spinner or staggered dots. Mirrors Fluxon's loading/1 (server-render + CSS only, no JS).

<.loading />
<.loading variant="dots-bounce" size="sm" label="Saving" />

Summary

Functions

loading(assigns)

Attributes

  • variant (:string) - Spinner style: rotating ring or three-dot bounce/fade/scale. Defaults to "ring". Must be one of "ring", "dots-bounce", "dots-fade", or "dots-scale".
  • size (:string) - Scales ring diameter / dot size (xs ~0.75rem … xl ~2rem). Defaults to "md". Must be one of "xs", "sm", "md", "lg", or "xl".
  • label (:string) - Accessible label for aria-label and screen-reader text. Defaults to "Loading".
  • class (:any) - Extra classes merged onto the root element. Defaults to nil.
  • Global attributes are accepted. Arbitrary HTML/phx-* attributes passed through.