← Startup screens

Loading and failure

app/startup
render() / renderFailure() -> UI.Node

Use the same Luau file to describe both states.

When to use it

Read this page when you need to apply Loading and failure, verify its exact contract, and adapt the example without bypassing validation or host boundaries.

Focused example

local UI = require("luastra/ui")
return {
    render = function()
        return UI.Screen { id = "loading",
            UI.Text { id = "message", text = "Opening your application…" },
        }
    end,
    renderFailure = function()
        return UI.Screen { id = "failure",
            UI.Text { id = "message", text = "Could not open the application." },
            UI.Button { id = "retry", text = "Try again", onTap = "startup.retry" },
            UI.Link { id = "help", text = "Documentation", href = "https://luastra.dev/docs/", external = true },
        }
    end,
}

Complete inventory

View all pages in Startup screens