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
Property | Type | Default | Required | Description |
---|---|---|---|---|
accessibilityLabel | String | 'Loading' | No | Accessibility 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`. |
className | String | - | No | Allows extending the class names of the Loader component. |
size | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | 'md' | No | Changes the loader's size, affecting its height and width. |
style | StyleProps | - | No | The `style` prop allows extending the style of the Loader component. |