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

Chapter 10 Feedback

Spinner

Shows that something is loading and says what, in words, to screen readers. Keep it for waits of more than a second. With reduced motion it stops turning and stays as a faint ring.

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

Sizes and labels

Loading ordersLoading ordersLoading the report
Angular
<ui-spinner label="Loading orders" />
<ui-spinner label="Loading orders" showLabel />
<ui-spinner label="Loading the report" size="lg" showLabel />

In a button

A busy button already has a spinner: use its loading input, not a second spinner.

Angular
<button ui-button [loading]="saving()">Save</button>

In Arabic

بنحمّل الطلبات
Angular
<ui-spinner label="بنحمّل الطلبات" showLabel />

When to use something else

If you needUse
Work with a known lengthProgress
A whole page or card that is loadingSkeleton

Inputs

NameTypeDefaultWhat it does
labelstring'Loading' from labelsWhat is loading, translated; read by screen readers.
showLabelbooleanfalseShows the label next to it too.
size'md' | 'lg''md'lg: a big spinner over its label, for a page or panel.

Keyboard and screen readers

  • Says what is loading, in words, to screen readers.
  • With reduced motion it stops turning and stays as a faint ring.