Example 1: Default Spinner
The default spinner is centered, large, and has a block display.
<cll-spinner />A spinner is a visual indicator of an ongoing, user-initiated process. Clarity has two types of spinners, each with its own use case: Page Spinners for tracking the progress of an operation related to an entire page, and Inline Spinners for tracking the progress of an operation related to a specific component.
The default spinner is centered, large, and has a block display.
<cll-spinner />Spinners can be displayed in different sizes: large (default), medium, and small.
Large (default):
Medium:
Small:
<!-- Large (default) -->
<cll-spinner />
<!-- Medium -->
<cll-spinner [size]="'md'" />
<!-- Small -->
<cll-spinner [size]="'sm'" />Control the alignment of the spinner using the center input.
Centered (default):
Left-aligned:
<cll-spinner [center]="false" />Apply custom CSS classes to the spinner for additional styling.
<cll-spinner [center]="false" [class]="'mx-10'" /> Use the inline input to display the spinner as an inline-block element, useful for aligning spinners within text or other inline elements.
<div>
<cll-spinner inline [class]="'mx-2'" />
<span>Loading...</span>
</div>Component for displaying loading spinners.
size?: 'lg' | 'md' | 'sm'Determines the spinner size. Accepts 'lg' (default), 'md', or 'sm'.
center?: boolean Centers the spinner as a block element (default). Pass false to disable centering.
inline?: booleanSpecifies whether the spinner should be displayed as an inline-block element. Useful for aligning spinners within text or other inline elements.
customClass?: stringA string of additional CSS classes to apply to the spinner.