Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Tappable device repair Contact Block for React

A repair request for a phone shop where four buttons on a drawn phone pick the parts, and a model menu lists an example price for each.

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 repair request for Screenwright Repairs, built for React with Base UI. A drawn phone in a Frame carries four real buttons in a Toggle Group: screen, battery, camera and charging port. Chosen parts highlight on the drawing and in a Data List of example prices for the model in the Select (Pocket S, Pocket Pro, Fold S or Mini). On a wide screen the drawing sits at the start with the four parts as a list of buttons beside the phone; the drawing and its list come first in the source and on a phone, where the phone is short and the parts become a two-by-two grid above the form. Submitting checks that at least one part, a name and an email are set, then confirms in the form's cell with the model, the parts and the example total. It's built from Field, Input, Select, Toggle Group, Data List, Frame, Guides, Shine Button and Button.

FAQ

Where does the form send its data?

Nowhere yet. The submit handler waits 800 milliseconds, then shows the confirmation. Replace that timer in submit with your own call. The request is the model id, the chosen part ids, the name and the email. Prices are examples in MODELS; they are not a quote a server has accepted.

How do the parts on the phone work?

The drawing is decorative. The four buttons are a multi-select Toggle Group, so each part can be on or off, and a chosen part uses the foreground colour. The same choice fills that part of the drawing and marks its row in the price list. The example total adds the chosen prices and is a status line, so a change can be announced. At least one part is required; the message sits under the buttons and focus moves there.

How is the model select labelled?

The label above it names the select, and the prices follow the model that is showing. Pocket S is selected to start. The select's trigger takes the id, and the label points to it with htmlFor.

How does the form check what's typed?

The form has noValidate. On submit, problems checks that a part is chosen, that a name is present, and that the email has an @ and a domain. Each problem appears under its field with an icon, and focus moves to the first one. Choosing a part, or typing, clears that message. The model is always one of the four.

What does the confirmation say?

It thanks the visitor by first name and repeats the model, the chosen part names and the example total. It's a status region that takes focus, and "Repair another phone" clears the parts and the fields and puts focus on the form heading. The line under the button is where the one-business-day reply lives.

How does it fit on a phone?

The drawing is placed first, then the form. The phone drawing is short, and the four parts sit in a two-by-two grid under it instead of over the drawing. Name and email go one per row below sm, and the submit button goes full width. Under 360 pixels the contact labels shrink to their icons. The header fades up once; with reduced motion it simply appears. desk@screenwright.example and +1 (555) 010-0162 are fictional, and every price is an example.

  • Pro

    Floor Plan Coworking Contact

    Visits and services

    A tour request for a coworking space that starts with a floor plan: four tappable zones with their vacancy, then a start date, a team size, a name and an email, checked against the zone chosen.

  • Pro

    Budget Range Slider Contact

    Quotes and estimates

    A 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

    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

    Photo Access Repair Contact

    Repairs and claims

    A repair request for a housing association: three photo slots with thumbnails, two access switches, a visit window, and a what-happens-next panel that rewrites itself as you choose.

  • Pro

    Warranty Meter Contact

    Repairs and claims

    A warranty claim where the purchase date works out your cover on one line: a meter of the 24 months used, the month cover ends, and issue types that change with it.

  • Pro

    Order Lookup Contact

    Support and feedback

    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.