分步表单

New

「一次一题」聚焦式多步表单:分段进度条配等宽计数,方向性滑动切换配合容器高度变形;支持文本题与选择卡题,校验失败抖动且错误行预留空间不跳版,Enter 直接推进,完成态画圈打勾。

01/04

INTRO

A first name is fine.

安装

用 shadcn CLI 添加,或手动复制源码。

$ bunx --bun shadcn add @uilab/step-form

API 参考

steps
StepFormStep[]
onComplete?
((values: Record<string, string>) => void | Promise<void>)
successTitle?
string

Default "All set".

All set
successMessage?
string
onRestart?
(() => void)

Provide to show a ghost "restart" button on the success screen.

className?
string

Keep in mind

Some components on this site are inspired by or recreated from existing work across the web. I'm not here to take credit; just to learn, experiment, and sometimes push things a bit further. If something looks familiar and I forgot to mention you, reach out and I'll fix that right away.