shadcn.io is not affiliated with official shadcn/ui
Crew Estimate Moving Contact Block for React
A moving quote in three bands: a home-size segment and special-item toggles, a live crew, truck and hours estimate, then distance, move date, name and email.
Installation
Overview
A moving quote for React with Base UI, for a company such as the fictional Hauldrew Movers. A centred header sits over a narrow card in card on +-marked corners, cut into three bands. The first band sizes the move: a Segment Group for the home (studio, 1 bed, 2 bed, 3+ beds) and a Toggle Group for special items (a piano, a safe, fragile art, or none). The middle band is the estimate, a definition list of crew, truck and time on site that is worked out from the home, the items and the distance, labelled "Example only". The last band holds the fields: distance in miles in a Number Input, a move date in a Date Picker that locks past days, name and email, and the Shine Button. Submitting checks the fields, shows each problem under its field and moves focus to the first one; a valid request turns into a confirmation in the same space that repeats the home, the distance, the date, the items and the estimate. It's built from Frame, Segment Group, Toggle Group, Badge, Number Input, Date Picker, Field, Input, Guides, Shine Button and Button. For moving companies, couriers and removals services. The numbers are an example, not a quote.
FAQ
How is the estimate worked out?
Each home size has a base crew, truck length and hours on site (a studio is two movers, a 10 foot truck and 3 hours; 3+ beds is four movers, a 26 foot truck and 9 hours). A piano or a safe adds a mover and an hour; fragile art adds an hour. Every full 25 miles adds an hour on the road, and the range shown is that figure to one more hour (written 10–11 in the cell, and read as "10 to 11 hours" in the spoken sentence and the confirmation). It all lives in SIZES, SPECIALS, MILES_PER_HOUR and estimateOf at the top of the file, so you can swap in your own rules or call your pricing service from there. It is labelled "Example only" because nothing here is a quote.
How does the None toggle work?
It's a Toggle Group where several items can be on at once, with one rule on top: pressing None turns every other item off, and pressing any other item turns None off. Turning off the last item brings None back, so the group is never empty and the estimate always has an answer.
Does a screen reader hear the estimate change?
Once, when a choice settles. A hidden polite status speaks the estimate after the home size or the special items change and after the distance field loses focus, not on every digit typed. The estimate cells themselves are plain text in a definition list, so they can be read at any time.
How does the move date work?
Type a date as mm/dd/yyyy or open the calendar; it opens on the current month and days before today are greyed out. A past date typed by hand is refused too, with "Pick today or a later day." under the field. The clock is read only when the calendar opens or a date is picked, never during render, so the server and the browser render the same page. The date is required, and the confirmation repeats it.
Where does the form send its data?
Nowhere yet. The submit handler waits 800 milliseconds, as a stand-in for a request, then shows the confirmation. Replace that timer in submit with a call to your quotes inbox: details holds the home, the items, the distance, the date, the name and the email. quotes@hauldrew.example is on the reserved .example domain. The confirmation promises no reply time, because nothing here keeps one.
Related
- Pro
Rent Affordability Contact
Finance and propertyA rental inquiry card in card where a monthly income fills a rent-to-income bar with a 33% guide tick, beside a lease term, a move-in date picker and a name and email.
- Pro
Date Range Calendar Rental Contact
Events and datesAn equipment-hire request in four ruled bands: a tool select with its rates, an inline range calendar with a delivery switch, a band of hairline cells that prices the hire, then name and email.
- Pro
Live Count Property Search Contact
Finance and propertyA rental search whose match count falls as you narrow it: bedrooms, a rent range, must-haves and neighbourhood chips, three example homes beside it, then a form that checks itself and confirms in place.
- Pro
Budget Range Slider Contact
Quotes and estimatesA roofing quote request as a card in a card: three kinds of job, a two-thumb budget slider that says in words what the range covers, and a short form that checks itself.
- Pro
Order Lookup Contact
Support and feedbackAn order desk that looks the order up first: a number and email, a read-only timeline with dates counted from today, then a help form that wakes once an order is found.
- Pro
Card in Card Contact
Contact formsA card-in-card contact section for a bookkeeping service: the details of the desk you pick beside a raised form with a live message counter.