Skip to main content

Component | Spinner

tip

Looking to show loading states in your app? We recommend using the page.loading() method for the vast majority of use cases. It's far simpler to use and comes with additional features such as disabling user interactions while loading.

The spinner component is useful for complex UI situations when you need more control over exactly where the spinner is displayed.

Render a loading spinner.

ui.spinner()

API reference

Function signature

ui.spinner(
options: Partial<{
text: string
style: Style
}>
)

Parameters

properties.text

optional string
Text to display next to the spinner.

properties.style

optional Style

Directly style the underlying element using CSS. See the styling guide for more details on available style properties.