LedgerUI.Components.Spinner (LedgerUI v0.2.0)

Copy Markdown View Source

Short loading indicator: five designs, five sizes and the system colours.

<.spinner color="primary" variant="soft" size="md" label="Saving" />

With a label (default "Loading") it is role="status" and aria-labelled; pass label={nil} for a purely decorative one. white and current (the surrounding text colour) are for spinners inside filled buttons.

Summary

Functions

spinner(assigns)

Attributes

  • color (:string) - Defaults to "neutral". Must be one of "neutral", "primary", "secondary", "info", "success", "warning", "error", "white", or "current".
  • variant (:string) - Defaults to "canvas". Must be one of "canvas", "border", "soft", "grow", or "svg".
  • size (:string) - Defaults to "sm". Must be one of "xs", "sm", "md", "lg", or "xl".
  • elastic (:boolean) - Defaults to false.
  • label (:any) - Accessible name; nil for a decorative spinner. Defaults to "Loading".
  • class (:any) - Defaults to nil.
  • Global attributes are accepted.