Skip to content
Okaapiأوكابي
Framework for the code
Theme
Okaapi on GitHub

Chapter 10 Feedback

Skeleton

Grey shapes where content is loading, so the page does not jump when it arrives. Screen readers skip the shapes: mark the area busy and say it is loading with a spinner or a status message. With reduced motion the shapes stop pulsing.

Use it in Angular
import { SkeletonComponent } from '@okaapi-ui/angular';

A loading card

Loading the profile
Angular
<div class="ui-card" aria-busy="true">
  <ui-spinner label="Loading the profile" />
  <ui-skeleton shape="circle" />
  <ui-skeleton [lines]="2" />
  <ui-skeleton shape="block" />
  <ui-skeleton [lines]="3" />
</div>

When to use something else

If you needUse
Work with a known lengthProgress
A short wait inside a buttonSpinner

Inputs

NameTypeDefaultWhat it does
shape'text' | 'circle' | 'block''text'Lines, an avatar, or an image or card.
linesnumber1Lines of text; the last one is shorter.

Keyboard and screen readers

  • Screen readers skip the shapes: mark the area busy and say it is loading in words.
  • With reduced motion the shapes stop pulsing.