Skip to content

Skeleton for Angular

AngularFeedback

Decorative loading placeholders (text lines, rectangles, circles) hidden from assistive technology, with a static helper to mark the loading region aria-busy. Sizes are strictly validated CSS lengths written through the CSSOM.

  • Three shapesText lines, rectangles, and circles shaped like the content that is coming.
  • Sized to fitLine count, width, and height mirror the final layout to avoid jumps.
  • Busy regionsMarks the loading region busy so screen readers wait for the real content.
  • Calm animationA gentle pulse that turns off with reduced motion or on request.

Behavior, design tokens, and limitations are described on the Skeleton page; this page covers the Angular API.

import { Component, signal } from '@angular/core';
import { AuiSkeleton } from '@absoluteui/angular/skeleton';
@Component({
selector: 'app-card',
imports: [AuiSkeleton],
template: `
<section [attr.aria-busy]="loading() ? 'true' : null">
@if (loading()) { <aui-skeleton shape="text" [lines]="3"></aui-skeleton> } @else { <p>{{ text() }}</p> }
</section>`,
})
export class CardComponent {
readonly loading = signal(true);
readonly text = signal('');
}
Terminal window
npm install @absoluteui/angular @absoluteui/components @absoluteui/core @absoluteui/theme

Setup with provideAbsoluteUI() is covered in Getting started. Styles are included with the component.

import { AuiSkeleton } from '@absoluteui/angular/skeleton';

Defaults for every instance: provideAbsoluteUIConfig({ components: { skeleton: { ... } } }) (see Configuration).

Class AuiSkeleton; template reference #ref="auiSkeleton".

Server rendering: Renders on the server; the browser re-creates it after hydration.

Input Type Default Description
shape SkeletonShape 'text' Placeholder shape.
lines number '3' Text lines (integer 1..100); the last of several lines is 60% wide.
width string | null CSS length (px, rem, em, %, ch). null restores the default.
height string | null CSS length (px, rem, em, %, ch); per line for text. null restores the default.
animation SkeletonAnimation 'pulse' Pulse animation; always none under reduced motion.

Pattern: Decorative placeholders (aria-hidden) inside a region marked aria-busy, with a separate status message.

The Angular component renders the framework-neutral component, so its keyboard support, roles, WCAG 2.2 criteria, budgets, and import cost apply unchanged: see Skeleton: Accessibility and performance.