Skip to main content

Loader: React

To convey to a user that a page or a specific part is loading, you can present them with a Loader.

Installation

Before you can start using the @mediahuis/chameleon-react component, you’ll need to install it, for more information check: Getting started for developers.

With that done, you’re now ready to implement the component in your application.

import { Loader } from '@mediahuis/chameleon-react';

export default function Example() {
return <Loader />;
}

Properties

PropertyTypeDefaultRequiredDescription
accessibilityLabelString'Loading'NoAccessibility friendly label for the Loader. If the loader is never removed from the DOM, use in combination with `aria-hidden` attribute. You should wrap the loading content within a section scoped by `aria-busy`.
classNameString-NoAllows extending the class names of the Loader component.
size'sm' | 'md' | 'lg' | 'xl' | '2xl''md'NoChanges the loader's size, affecting its height and width.
styleStyleProps-NoThe `style` prop allows extending the style of the Loader component.