toggleSpinner
API reference for the "toggleSpinner" method.
Shows or hides a loading spinner.
const canva = window.canva.init();
canva.onReady(async (opts) => {
// Show the spinner
canva.toggleSpinner("preview", true);
// Hide the spinner
// canva.toggleSpinner('preview', false);
});
Name | Type | Required | Description |
---|---|---|---|
area | string | Yes | The location of the spinner. The only supported value is "preview" , which places the spinner in front of the user's image. |
visible | boolean | Yes | If true , the spinner is visible. If false , the spinner is not visible. |
void
Last modified 1yr ago