Skip to main content

ctx.loading.start

Kicks off a loading spinner to provide context during any long-running action work. Can also be called with a single string argument as the title, or with no arguments to display only a spinner.

await ctx.loading.start({
title: "Reticulating splines...",
});

await ctx.loading.start("Title only shorthand");

description

string Optional

Secondary label providing additional context for the loading spinner.

itemsInQueue

number Optional

Number of "items" your action needs to work through to complete loading. Subsequently calling `ctx.loading.completeOne` (e.g. within a loop) updates the spinner’s progress.

title

string Optional

Primary label for the loading spinner.

Returns

null

Did this section clearly explain what you wanted to learn?