Loading

Indicate that content or an operation is loading.

Loading

Default

Generate a loading with the Sax Design function

Copied
import { SLoading, SLoadingFn } from 'sax-design-vue'

SLoadingFn(options)

// Or use via service
SLoading.service(options)
Code copied

Type Update

Change the type of loading with the option type

Tipos de loading:

  • atom
  • ball
  • scale
  • waves
  • border
  • points
  • square
  • circles
  • corners
  • default
  • gradient
  • rectangle
  • square-rotate

Click on the example loading to open it in the whole page

Code copied

Color

Change the color of the loading animation with the property color, the colors can be the main ones of Sax Design or (RGB, HEX)

Code copied

Background

You can change the loading background with the property loading

Code copied

Text

Add a descriptive text of the loading or informing the user that it is loading or that it is missing to load with the property text

Code copied

Percent

You can add a string of the percentage of load with the percent property, if you need to change that value use the setPercent function in the loading instance.

Code copied

Progress

Add a progress bar at the top to indicate the loading progress of the loading with the progress property, the value is a number that determines the percentage and the allowed value is (0 - 100)

Code copied

Target

Use the loading on a specific dom element using the target property and the value can be a string with the id or the class only if it is unique for the element, you can also use the element itself as per example using $refs.

Ensure the target’s style was set position

Code copied

API

PROPS

PropertyTypeValuesDescriptiondefaultExampleMore
typeStringatomballscalewavesborderpointssquarecirclescornersdefaultgradientrectanglesquare-rotateChange the animation of the loading.default
color StringAll colors of Sax Design (RGB y HEX)Change the color of the loading animation.primary
background StringAll colors of Sax Design (RGB y HEX)Change the background color of the loading.#fff
textStringStringAdd a text below the loading animation.
percentNumber0 - 100 (%)Add a percentage text inside the loading.
progressNumber0 - 100Add a progress bar to the loading and the progress would be the value.
targetString | HTMLElement | Ref<HTMLElement> | Vue ComponentString: Element SelectorHTMLElement: Selector elementRef HTMLElementDetermine the parent of the loading where it will be instantiated.
opacityNumber0 - 1Change the opacity of the background.0.6
scaleNumberChange the size of the loading animation.1
setPercentFunction(percent: Number) => voidChange the value of the percent after instantiating the loading.
setProgressFunction(progress: Number) => voidChange the value of the progress after instantiating the loading.
setTextFunction(text: String) => voidChange the value of the text property after instantiating the loading.
No matching data
Last Updated: 2026-08-17, 08:33:54