EssenceUI.Components.Spinner (Essence UI v0.2.0)

Copy Markdown View Source

A Spinner component that displays a loading animation.

Supports various sizes and styling options.

Summary

Functions

Renders a spinner component.

Functions

spinner(assigns)

Renders a spinner component.

Examples

<.spinner />
<.spinner size="2" />
<.spinner size="3" class="text-blue-500" />

Props

  • size - Spinner size: "1", "2", "3" (default: "2")
  • loading - Whether the spinner is actively loading (default: true)
  • Plus margin props (m, mx, my, mt, mr, mb, ml)

Attributes

  • m (:any) - Margin utility class string or map. Example: 1 or %{xs: '1', sm: '2'}.
  • mx (:any) - Margin utility class string or map. Example: 1 or %{xs: '1', sm: '2'}.
  • my (:any) - Margin utility class string or map. Example: 1 or %{xs: '1', sm: '2'}.
  • mt (:any) - Margin utility class string or map. Example: 1 or %{xs: '1', sm: '2'}.
  • mr (:any) - Margin utility class string or map. Example: 1 or %{xs: '1', sm: '2'}.
  • mb (:any) - Margin utility class string or map. Example: 1 or %{xs: '1', sm: '2'}.
  • ml (:any) - Margin utility class string or map. Example: 1 or %{xs: '1', sm: '2'}.
  • size (:string) - Spinner size. Defaults to "2". Must be one of "1", "2", or "3".
  • loading (:boolean) - Whether spinner is loading. Defaults to true.
  • class (:string) - Additional CSS classes. Defaults to nil.
  • style (:string) - Additional inline styles. Defaults to nil.
  • Global attributes are accepted.