Skip to main content

LoadingContainer

import { LoadingContainer } from '@enmovil/ui-design-system';

Provides an app-wide loading indicator. Wrap your app in LoadingContainer, then call useLoader().showLoader() and hideLoader() from any component inside it.

Properties​

PropertyTypeRequiredDefaultAllowed valuesDescription
defaultLoaderPropsPartial<LoaderProps>No{}—Default settings for the loader, such as size (sm, md or lg), variant, text and fullScreen. Without it the loader is medium-sized and full-screen; options passed to showLoader() are merged over these and kept for later calls.
sizestringNo—'small', 'middle', 'large'Not a prop of LoadingContainer; it is only a story control and has no effect. Set the loader size with defaultLoaderProps.size (sm, md or lg).
colorstringNo—'primary', 'secondary', 'white'Not a prop of LoadingContainer; it is only a story control and has no effect. Set the loader colour with defaultLoaderProps.variant (default, primary or secondary).
isFullscreenbooleanNo——Not a prop of LoadingContainer; it is only a story control and has no effect. Use defaultLoaderProps.fullScreen (on by default) instead.

Events​

This component has no events.

Children​

LoadingContainer does not accept children.

Variants​

Loading examples…

Playground​

Change the controls to see how the properties affect the component. Values the controls don't cover come from the Loader example.

Loading playground…

Storybook​

Open LoadingContainer in Storybook to try every story with the full set of controls.