Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Order Lookup Contact Block for React

An 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.

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

A contact section for React with Base UI that looks the order up before it asks anything. A start-aligned header sits over three ruled bands. The first is a lookup: an order number and an email, with three sample numbers as chips that fill the field, because the block has no server; an unknown number gets a plain message. The second is a read-only timeline drawn with Steps (ordered, packed, shipped, delivered): done steps are filled, the next one is outlined, and each has a date counted from today, with "Expected" on the ones still to come; before a lookup it waits with dashes. The third is the help form, a topic in a Select and a message, asleep and dimmed until an order is found, with a line saying why. A sent message turns into a confirmation that names the order and the topic, in the same space. It's built from Steps, Select, Field, Input, Textarea, Guides, Shine Button and Button, with your theme's tokens for every colour. For shops and marketplaces whose most common message is "where is my order?".

FAQ

Where does the lookup get its orders?

From SAMPLES at the top of the file: PK-1042 (delivered), PK-1043 (on its way) and PK-1044 (packed). Type one in any form ("pk 1043" works), with any well-formed email. Replace the check in lookUp with a request to your orders service and build the Found object from its answer; the timeline only needs the four step dates and how many are done.

Why do the dates change every day?

Each sample stores its steps as days from today (minus three, minus two, and so on) and the dates are worked out when the visitor looks the order up, never while the page renders. So a sample is always "shipped yesterday", whenever the page is read. Real orders would carry real dates.

Is the timeline accessible?

It's a list named "Order progress" whose items are the four steps. Steps normally draws a wizard whose steps are buttons; here no step has a trigger, so each is a marker, a title and a date, and nothing in it can be pressed. The summary above it ("Status: on its way") is a polite live region and focus moves to the order's heading when a lookup succeeds.

Why is the help form dimmed before a lookup?

It's inert until an order is found, so Tab skips it, and a line under the button says why. It's there from the start so the block never changes height, and it still shows the one primary button. A new lookup clears any message in progress.

How is the topic select labelled?

The label above it names the select's button for screen readers, and focus can land on that button when the topic is missing. The select's trigger takes the id, and the label points to it with htmlFor.

How does it fit on a phone?

The fields stack, the lookup button goes under them, and the timeline stays vertical at every width, so four steps with dates fit a narrow screen without scrolling sideways. The chips wrap onto a second line when they need to.

  • Pro

    Support Channels Contact

    Support and feedback

    A support desk for a help desk tool: a band of four channels with their response times above a form with a subject, a normal or urgent priority and a message, which checks itself and confirms in place.

  • Pro

    File Attachments Contact

    Support and feedback

    A support request on a card in card with a file drop zone: up to four PDFs or images, a progress bar per file, an error row for a wrong type, and a form that waits for the files before it sends.

  • Pro

    A contact form that tries to answer first: five numbered answers in an accordion beside a form whose subject field opens the answers that match, then checks itself and confirms in place.

  • Pro

    Invoice History Billing

    Payment and invoices

    An account's invoices: a table filtered by status (paid, due, failed) with amounts, dates and PDF links, and a retry on the failed payment. On a phone each invoice is a card.

  • Pro

    A talk-to-sales split for a scheduling platform: what happens next as three numbered steps and a band of contact details beside a form that checks itself, shows each problem under its field and confirms in place.

  • Pro

    A cancellation form that asks why first: four reason cards, an offer panel that follows the reason (20% off, a smaller plan, a pause), and a confirm box, note and submit that are always there so an offer never blocks cancelling.