Default
Generate a loading with the Sax Design function
import { SLoading, SLoadingFn } from 'sax-design-vue'
SLoadingFn(options)
// Or use via service
SLoading.service(options)
Generate a loading with the Sax Design function
import { SLoading, SLoadingFn } from 'sax-design-vue'
SLoadingFn(options)
// Or use via service
SLoading.service(options)
Change the type of loading with the option type
Tipos de loading:
Click on the example loading to open it in the whole page
Change the color of the loading animation with the property color, the colors can be the main ones of Sax Design or (RGB, HEX)
You can change the loading background with the property loading
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
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.
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)
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
| Property | Type | Values | Description | default | Example | More |
|---|---|---|---|---|---|---|
| type | String | atomballscalewavesborderpointssquarecirclescornersdefaultgradientrectanglesquare-rotate | Change the animation of the loading. | default | ||
| color | String | All colors of Sax Design (RGB y HEX) | Change the color of the loading animation. | primary | ||
| background | String | All colors of Sax Design (RGB y HEX) | Change the background color of the loading. | #fff | ||
| text | String | String | Add a text below the loading animation. | — | ||
| percent | Number | 0 - 100 (%) | Add a percentage text inside the loading. | — | ||
| progress | Number | 0 - 100 | Add a progress bar to the loading and the progress would be the value. | — | ||
| target | String | HTMLElement | Ref<HTMLElement> | Vue Component | String: Element SelectorHTMLElement: Selector elementRef HTMLElement | Determine the parent of the loading where it will be instantiated. | — | ||
| opacity | Number | 0 - 1 | Change the opacity of the background. | 0.6 | ||
| scale | Number | — | Change the size of the loading animation. | 1 | ||
| setPercent | Function | (percent: Number) => void | Change the value of the percent after instantiating the loading. | — | ||
| setProgress | Function | (progress: Number) => void | Change the value of the progress after instantiating the loading. | — | ||
| setText | Function | (text: String) => void | Change the value of the text property after instantiating the loading. | — | ||
| No matching data | ||||||