Components
← All components

Frame Loading State

stimeo--frame-loading

Shows a skeleton and sets aria-busy while a turbo-frame loads, blocking interaction and retreating focus.

  • Rails / Turbo

The stimeo--frame-loading controller manages a <turbo-frame>'s loading state. It subscribes on the frame to Turbo's own fetch lifecycle — turbo:before-fetch-request (which bubbles up from the frame's links and forms, or the frame itself) starts the state and turbo:frame-load ends it, with turbo:fetch-request-error as a safety net so it never sticks. While loading it sets aria-busy and data-frame-loading, reveals the optional skeleton / overlay targets, marks the content target inert to block double-submits, and retreats focus out of the stale content, restoring it on completion when restoreFocus is set. minDuration keeps the skeleton up long enough to avoid a flicker. Behavior only — it ships no skeleton markup or styling (pair with Skeleton / CSS); loading lives purely in aria-busy / data-frame-loading and the targets' hidden. Listeners and the min-duration timer are torn down on disconnect (Turbo navigation included), which also tidies the hooks so a cached frame is never left busy.

running

Loaded content.