Skip to content

OcSpinner component ​

Description ​

The OcSpinner component displays a loading spinner to the user, indicating that the system is processing something.

Accessibility ​

A loading spinner needs to be described to screen readers via the aria-label property.

As soon as the spinner appears, it should programmatically receive focus so that its aria-label is read out by the screen reader. For this reason, the component sets tabindex="-1" on the element. After the completion of the loading process, the focus should be sent to a reasonable place in the newly loaded content.

Examples ​

Default ​

The most basic use case should involve an aria-label.

Sizes ​

These sizes are available: xsmall, small, medium, large, xlarge, xxlarge, xxxlarge.

Properties ​

Emits ​

Slots ​