shadcn.io is not affiliated with official shadcn/ui
Train Track Stepper Block for Solid
A drawn length of track with five stations and a small locomotive that slides to each one, for a heritage-railway trip builder with a day, a departure, seats, extras and a read-back.
Installation
Overview
Let the marker do the work with this train-track stepper for Solid with Ark UI. A hairline frame with a plus mark on each corner holds a length of drawn track, two rails with sleepers between, and five stations along it: Day, Train, Seats, Extras and Review. A small locomotive slides to whichever station you are at, and the rails you have travelled turn solid. Each station is a real Steps button, so a visited one can be reopened. Every station asks one thing: a Saturday in a Select, one of two departures in a Radio Group, the number of seats, the extras as Switch rows, then a Data List read-back with the total worked out from the choices. Continue is the block's one Shine Button. For trips, journeys and any flow with a route.
FAQ
How do I change the days, trains and prices?
DAYS, SEATS, DEPARTURES and EXTRAS hold the choices. Fares are whole pounds per seat, the lunch is per seat and the guidebook once per booking, and the total is worked out by totalOf from them. To add a station, add it to STATIONS and give it a StepsContent; the locomotive position is computed from the count.
What stays local, and how do I make it real?
Everything. The choices live in component state and the last step ends on "Planned in this demo": no seats are held and nothing is charged. To make it real, send the day, train, seats and extras from the advance handler on the last step to your booking API, and take the price from its answer rather than from totalOf.
What moves, and does it stop?
The locomotive slides to the next station in half a second and the travelled rails grow to meet it. Nothing loops, and under reduced motion both simply jump.
Does it work right to left?
Yes. The track runs from the right, the locomotive is placed with a logical offset and its glyph is flipped to face the way it travels. Times and prices stay left to right so the numbers read correctly.