MML React
Edit page
ReadmeMML
Components
Utility Components
CardCard bodyCard headerErrorLoadingPropertiesBasic usageWith textStyle customizationSuccess
Changelog

Loading

Loading simply indicates a loading/pending state, you can use it to manage users expectations during async behaviours or waiting times. Internally it uses the <Progress /> component to show a circular progress indicator.

This component is not exposed as mml string, it is used internally in other mml components and it can be imported to create your custom ones.

Properties

loading
boolean | undefined
text
string | undefined
className
string | undefined
size
string | number | undefined
'SCSS: $mml-progress-width: 1em'
thickness
string | number | undefined
3.6
color
string | undefined
'SCSS: $mml-progress-color: #bbb'

Basic usage

MrLahey | Service
Hi Ricky. I am Mr. Lahey’s messaging assistant
So, what can I help you with?
22:30 pm
ML

With text

MrLahey | Service
Hi Ricky. I am Mr. Lahey’s messaging assistant
So, what can I help you with?
22:30 pm
ML
Please wait...

Style customization

If your projects include a sass compilation step you might customize the overall look and feel of the component through scss variables, here are all the available ones with their default values:

// Loading:
$mml-loading-spacer: $mml-spacer;
$mml-loading-font-size: 88%;
// Progress:
$mml-progress-width: 1em;
$mml-progress-color: #bbb;
$mml-progress-animation-name: mml-animation-dash;
$mml-progress-animation-time: 1.4s;
$mml-progress-animation-ease: ease-in-out;