No Preview

Sorry, but you either have no stories or none are selected somehow.

If the problem persists, check the browser console, or the terminal you've run Storybook from.

Loader

A loader provides reassurance that content is currently being loaded, processing, or that change will occur on the page.

usage
import { Loader } from "@sharegate/orbit-ui";
sources
Github

Guidelines

When to use

  • To give feedback for an entire page load.
  • On page elements where the visual layout/format of the content being loaded is unknown.
  • To indicate processing, or that change will occur on the page (rather than loading UI elements).

Accessibility

  • The loader has a role of status by default.
  • The parent component should have a aria-busy attribute set to true when the loader is visible.
  • The parent component should have a aria-live attribute set to polite.

Loader vs Spinner

  • When you need to give feedback for a user or system action, use a spinner instead.

Usage

  • Avoid increasing the size of the Loader to maintain consistency with other indicators accross the application.
  • Always center the Loader and position it close to where you want the user's attention to be once loading is complete.
  • Ideally used on a body or surface background.
  • The delay property should often be used to avoid flashing the loader when the loading time is very short.

Default

This is the default loader.

Editable example

Delay

A loader can appears after a short delay. This is to prevent the loader from appearing when the action is very fast. By settings delay to true, the loader will appear after 300ms. You can also set a custom delay in milliseconds.

Editable example

API

Loader

usage
import { Loader } from "@sharegate/orbit-ui";
NameDescriptionDefault
aria-label*
See WCAG.
string
-
delay

A loader can appear after a short delay (in ms). if set the true, the default delay is 300ms.

numberfalsetrue
-