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.
import { SpinnerComponent } from '@okaapi-ui/angular';Sizes and labels
<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.
<button ui-button [loading]="saving()">Save</button>In Arabic
<ui-spinner label="بنحمّل الطلبات" showLabel />When to use something else
Inputs
| Name | Type | Default | What it does |
|---|---|---|---|
label | string | 'Loading' from labels | What is loading, translated; read by screen readers. |
showLabel | boolean | false | Shows 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.