Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Validation Errors Stepper Block for Ark UI

A street-event permit application where Next checks one step, failed steps show an alert glyph on the rail, and a problems list has Fix buttons that focus each field.

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

Put errors where people can find them with this validating stepper for React with Ark UI. A plus-marked frame holds a problems band, a Steps rail of four steps (Basics, Contact, Documents and Submit) and a form for a street-event permit. Next checks only the step you are on; when it fails, that step's ring shows an alert glyph and "Needs attention" instead of a check, and the band lists each problem with a Fix button that opens the step and focuses the field. Soft warnings, such as more than 500 people needing a safety plan or no insurance certificate named, are listed too but never block. "Next" and "Submit application" are the block's one Shine Button. The band keeps its height whatever it lists.

FAQ

How do I add or change a check?

Add an issue helper beside nameIssues or emailIssues: it returns a list of issues with a field, a message, a severity and the step it belongs to. issuesOf joins them; the band, the rail marks and the field messages all read that one list.

What is the difference between an error and a warning?

An error blocks Next and Submit. A warning is listed with the word "Warning" and a triangle, offers "Review" instead of "Fix" and never blocks. Neither is told by colour alone.

What does Fix do?

It opens the step the problem is on and moves focus to its field. The same helper handles the first problem when a Next press fails.

What stays local?

Values and the application are component state; nothing is sent and the last step ends on "Application held in this demo". To make it real, run the same checks on the server and return its issues in the same shape.

What does a screen reader hear?

The count in the band is a polite alert that updates when the problems change, each field has its message linked with aria-describedby, and the status line says "2 problems in Basics". Focus moves to the first field that needs fixing.

How does it look on a phone?

The rail shows numbers only with a "Step 2 of 4" line under it, the problems list scrolls inside its held band, and the foot with the button stays pinned.