Skip to content
Alea0.1

Feedback

LoadingOverlay

Covers a region while it loads, keeps the layout in place and tells screen readers it is busy.

Ant Design: Spin with children

import { LoadingOverlay } from '@alea/ui';

Examples

Reload in place

The table stays where it is; it can't be clicked while it loads.

Plugin
Users
Contrast Checker3,410
Palette Generator1,240

Props

LoadingOverlay props

Covers a region while it loads, keeps it in place and tells screen readers it is busy (Mantine LoadingOverlay, MUI Backdrop).

PropTypeDefaultDescription
childrenrequiredReactNode-The content it covers.
isLoadingrequiredboolean-Shows the overlay and marks the content busy.
blurbooleantrueBlur the content under it. Default true.
classNamestring-
labelstring'Loading'What is loading, for screen readers. Default "Loading".

Accessibility

  • The region gets aria-busy and its content becomes inert, so nothing inside can be focused or clicked while loading.

Do and don't

Do

  • Use it for a region that reloads in place (a table after a filter).

Don't

  • Don't cover the whole page for a small update.
Tested with axe, keyboard and screen reader roles