МетаЭра

SpinnerMacro

Редактировал(а) Вячеслав Мясоед 2024-12-06 11:52

Todos

Add message for screen readers when loaded ok.


The spinner macro displays a spinner within its container when this container uses attribute aria-busy to reflect its content loading state. The spinner is displayed/hidden automatically when the attribute aria-busy of its container is set to true / respectively to false. See also the documentation of the aria-busy and aria-live attributes.

Example

spinner.loading

(% aria-busy="true" %)(((
  {{spinner color="@brand-primary"
    thickness="3px" size="30px" top="10px"/}}
)))

Macro Parameters

NameDescriptionMandatoryDefault value
thicknessThickness of the spinnerno3px
sizeSize of the spinnerno25px
colorColor of the spinnerno@brand-primary
topPosition of the spinner relatively to the top of its containerno0
leftPosition of the spinner relatively to the left of its containerno50%

Limitations

At the moment, having several spinners on the same page with different styles is not supported. The styling needs to be set manually in this case, until it becomes possible in XWiki to include several times the same SSX page with different query parameters.