<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.7.0/styles/monokai-sublime.min.css" integrity="sha512-ade8vHOXH67Cm9z/U2vBpckPD1Enhdxl3N05ChXyFx5xikfqggrK4RrEele+VWY/iaZyfk7Bhk6CyZvlh7+5JQ==" crossorigin="anonymous" referrerpolicy="no-referrer" />
🌾 ng-oatv0.6.0Angular UI library

Skeleton

Placeholder loading indicators for content that hasn't loaded yet.

InputTypeDefaultDescription
type'line' | 'box''line'Shape of the skeleton
widthstringCustom width (e.g. '60%')

Import & Usage

typescript
import { Component } from '@angular/core';
import { NgOatSkeleton } from '@letsprogram/ng-oat/skeleton';

@Component({
  selector: 'app-example',
  imports: [NgOatSkeleton],
  template: `
    <ng-oat-skeleton type="line" />
    <ng-oat-skeleton type="line" width="60%" />
    <ng-oat-skeleton type="box" />
  `,
})
export class ExampleComponent {}

Line & Box Variants

html
<ng-oat-skeleton type="line" />
<ng-oat-skeleton type="line" width="60%" />
<ng-oat-skeleton type="line" width="40%" />
<ng-oat-skeleton type="box" />

Card Loading Placeholder

html
<article class="card">
  <header class="flex flex-col gap-3">
    <ng-oat-skeleton type="line" width="50%" />
    <ng-oat-skeleton type="line" width="80%" />
  </header>
  <div class="flex flex-col gap-3">
    <ng-oat-skeleton type="line" />
    <ng-oat-skeleton type="line" />
    <ng-oat-skeleton type="line" width="70%" />
  </div>
</article>