Lootstrap-angular
Accordion
Avatar
Breadcrumb
Card
Carousel
Dialog
Notify
Pagination
Rating
Sidenav
Spinner
Table
Tabs
Time
Timeline
TreeView
Highlighter
Mapper
Tooltip

Ng - Spinners

Styled byLS Spinners

Vortex

Loading...
Loading...
        <SpinnerVortex></SpinnerVortex>
        <SpinnerVortex [Square]="true"></SpinnerVortex>
        

With adaptive colors.

Loading...
Loading...
      <SpinnerVortex [Adaptive]="true"></SpinnerVortex>
      <SpinnerVortex [Adaptive]="true" [Square]="true"></SpinnerVortex>
        

Border

Use the border spinners for a lightweight loading indicator

Loading...
Loading...
          <SpinnerBorder></SpinnerBorder>
          <SpinnerBorder [Adaptive]="true"></SpinnerBorder>
        

Colors

The border spinner uses currentColor for its border-color, meaning you can customize the color with text color utilities. You can use any of our text color utilities on the standard spinner.

Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
        <SpinnerBorder class="Fg-red"></SpinnerBorder>
        <SpinnerBorder class="Fg-orange"></SpinnerBorder>
        <SpinnerBorder class="Fg-yellow"></SpinnerBorder>
        <SpinnerBorder class="Fg-lime"></SpinnerBorder>
        <SpinnerBorder class="Fg-blue"></SpinnerBorder>
        <SpinnerBorder class="Fg-purple"></SpinnerBorder>
        <SpinnerBorder class="Fg-magenta"></SpinnerBorder>
        <SpinnerBorder class="Fg-pink"></SpinnerBorder>
        <SpinnerBorder Color="orange"></SpinnerBorder>
        

Grow

If you don’t fancy a border spinner, switch to the grow spinner. While it doesn’t technically spin, it does repeatedly grow!

Loading...
Loading...
        <SpinnerGrow></SpinnerGrow>
        <SpinnerGrow [Adaptive]="true"></SpinnerGrow>
        

Once again, this spinner is built with currentColor, so you can easily change its appearance with text color utilities.

Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
        <SpinnerGrow class="Fg-red"></SpinnerGrow>
        <SpinnerGrow class="Fg-orange"></SpinnerGrow>
        <SpinnerGrow class="Fg-yellow"></SpinnerGrow>
        <SpinnerGrow class="Fg-lime"></SpinnerGrow>
        <SpinnerGrow class="Fg-blue"></SpinnerGrow>
        <SpinnerGrow class="Fg-purple"></SpinnerGrow>
        <SpinnerGrow class="Fg-magenta"></SpinnerGrow>
        <SpinnerGrow class="Fg-pink"></SpinnerGrow>
        

Text align

Use following code to align spinner center.

Loading...
    <div class="Text-center">
      <SpinnerBorder [Adaptive]="true"></SpinnerBorder>
    </div>
        

Size

Add [Small]="true" to make a smaller spinner that can quickly be used within other components.

Loading...
Loading...
    <SpinnerBorder [Adaptive]="true" [Small]="true"></SpinnerBorder>
    <SpinnerGrow [Adaptive]="true" [Small]="true"></SpinnerGrow>
        

Buttons

Use spinners within buttons to indicate an action is currently processing or taking place. You may also swap the text out of the spinner element and utilize button text as needed.

    <button class="Btn Btn-primary" type="button" disabled>
      <SpinnerBorder [Small]="true"></SpinnerBorder>
    </button>
    <button class="Btn Btn-primary" type="button" disabled>
      <SpinnerBorder [Small]="true"></SpinnerBorder>
      Loading...
    </button>
    <button class="Btn Btn-primary" type="button" disabled>
      <SpinnerGrow [Small]="true"></SpinnerGrow>
    </button>
    <button class="Btn Btn-primary" type="button" disabled>
      <SpinnerGrow [Small]="true"></SpinnerGrow>
      Loading...
    </button>
        

Through Service

Need to assign ViewContainerRef first, for creating dynamic components through Service as below:

constructor(private spinnerService: SpinnerService, private viewContainerRef: ViewContainerRef) {
  this.spinnerService.ViewContainerRef = viewContainerRef;
}
  

Basic usage

Adaptive, Color and Small props work on Grow and Border types. Adaptive prop will change color to current theme's accent color if its true.

      <button class="Btn Btn-primary"
              (click)="Spinner(+Pattern, Overlay, Adaptive, ExpireIn, Color, Small)">
        Show
      </button>
        
Pattern = SpinnerPattern.Border;
ExpireIn = 4000;
Color = 'hsl(45,100%,51%)';
Overlay = false;
Adaptive = false;
Small = false;

constructor(private spinnerService: SpinnerService, private viewContainerRef: ViewContainerRef) {
  this.spinnerService.ViewContainerRef = viewContainerRef;
}

Spinner(Pattern: SpinnerPattern, Overlay: boolean, Adaptive: boolean, expireIn: number,
        Color: any = undefined, Small: boolean = false): void {
  this.SpinnerId = this.spinnerService.Show(Pattern, Overlay, Adaptive, expireIn, Color, Small);
  // setTimeout(() => this.spinnerService.Hide(this.SpinnerId), 5000);
}