A Spinner component that displays a loading animation.
Supports various sizes and styling options.
Summary
Functions
Renders a spinner component.
Functions
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:1or%{xs: '1', sm: '2'}.mx(:any) - Margin utility class string or map. Example:1or%{xs: '1', sm: '2'}.my(:any) - Margin utility class string or map. Example:1or%{xs: '1', sm: '2'}.mt(:any) - Margin utility class string or map. Example:1or%{xs: '1', sm: '2'}.mr(:any) - Margin utility class string or map. Example:1or%{xs: '1', sm: '2'}.mb(:any) - Margin utility class string or map. Example:1or%{xs: '1', sm: '2'}.ml(:any) - Margin utility class string or map. Example:1or%{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 totrue.class(:string) - Additional CSS classes. Defaults tonil.style(:string) - Additional inline styles. Defaults tonil.- Global attributes are accepted.