Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Retry Recovery Stepper Block for Svelte

A data export that runs four stages with a half-second wait each, fails once at Encrypt with a plain reason, and finishes after Retry.

Framework
UI library

Preview

Preview width

Installation

Part of Pro
Pro unlocks the code and one-line install of every Pro button and text effect, plus the MCP for your AI editor.
Have Pro already? Sign in to open it.Opens here as soon as you're Pro.

Overview

Show a run that fails and recovers with this retrying stepper for Svelte with Ark UI. A plus-marked frame holds one column of four stages for a data export (Gather, Compress, Encrypt and Verify), each with a ring and a word for its state: Waiting, Running with a spinner, Done with a check, or Failed with a cross. "Start export" is the block's one Shine Button; it runs the stages one by one, Encrypt fails the first time with "Disk is full: 1.2 GB needed", and the same button becomes "Retry" while a ghost "Cancel export" appears. Retry picks up at the failed stage and the run finishes. The stages are rows, so they stack the same way on a phone.

FAQ

How do I choose which stage fails?

Set FAILS_ONCE to a stage id and FAIL_LINE to its reason. nextOf fails that stage on the first start only; remove the check to make the run always succeed.

What is simulated?

Everything. The waits are one-shot timers of WAIT milliseconds set by a press, nothing runs on load, and no archive exists. To make it real, drive run from your job status instead of the timer.

Where does Retry start?

At the failed stage, not the beginning. Cancel export returns to the start and says so; starting again after that fails Encrypt once more because the demo counts the starts.

What does a screen reader hear?

The list is marked busy while it runs, and the one polite status line says "Running 2 of 4: Compress", then "Encrypt failed: Disk is full: 1.2 GB needed". The failure is told by a cross and the word Failed, not by colour.

What about reduced motion?

The spinner stops turning and the shine on the button is replaced by a fade; the waits still happen because they are the demo, but nothing loops.

How does the keyboard work?

The stages are read-only, so Tab goes straight to Cancel export and the button. Focus stays on the button through Start, Retry and the result.