Skip to main content
Version: 1.0.4

Spinner

Overview

The Spinner component allows the user to display a rolling spinner.


Specification

Property

Here is a list of properties that can be used for modifying the component:

NameTypeDefaultDescriptionRemark
textstring""Text to be displayed at the bottom of the loader iconDisplays the default value if the value for text is unspecified or empty
info

If the text is unspecified or empty, consider assigning a visually-hidden class and given the word "Now loading..." in a hidden state for accessibility.

Constructor

Spinner(options)
Here is a list of available constructors:

Parameter

NameTypeDefaultDescriptionRemark
optionsobject{}Object that includes component properties

Method

Here is a list of available methods:

open()

Show the component

Parameter

none

Return

none

close()

Hide the component

Parameter

none

Return

none


Sample Code

Here is a sample code when all parameters are specified:

const spinner = new Kuc.Spinner({
text: 'now loading...'
});
spinner.open();
spinner.close();