shadcn.io is not affiliated with official shadcn/ui
Reproduction Steps Report Contact Block for React
A bug report on two overshoot cells: a severity segment, steps to reproduce you add and remove (up to six), expected and actual notes, one optional attachment, and a panel that ticks off what the report still needs.
Installation
Overview
A bug-report section for React with Base UI, laid out as two cells whose lines overshoot their corners. The first holds the report: a short title, a severity in a Segment Group (cosmetic, minor, major, blocker), the steps to reproduce as an ordered list of inputs with an "Add step" button (up to six, two to start) and a remove button on each row once there are more than two, "Expected" and "Actual" notes side by side (one over the other on a phone) and one optional attachment of up to two files. The second cell is a "What we need" panel that ticks off the title, two steps, a severity and both notes as they are filled in, keeps a count ("3 of 5 ready") and says what the chosen severity means. Submitting checks the report and focuses the first problem (the first empty step when the steps are short); a valid report turns into a confirmation in the same space. It's built from Segment Group, File Upload, Textarea, Input, Field, Guides, Shine Button and Button, with your theme's tokens for every colour. For bug trackers, support desks and open-source projects that want reproducible reports.
FAQ
How do the steps work?
Each step is its own input in an ordered list, named "Step 1", "Step 2" for a screen reader. "Add step" adds a row and moves focus into it, up to MAX_STEPS (six); once there are more than two, each row has a remove button, and removing one sends focus back to "Add step". A polite line says what changed ("Step 6 removed. 5 steps."). Every row has a stable id, so removing the middle one never mixes up the text.
What does the panel on the side do?
It lists the five things a report needs and fills each one in as the form meets it, with a count underneath. Each row carries "Done:" or "Needed:" for screen readers, and the count is spoken about 600 milliseconds after the last change instead of on every key. The severity line under the count changes with the chosen severity (all four wordings share one grid cell, so nothing moves).
Is the attachment really uploaded?
No. The file stays in the visitor's browser tab and only its name is listed; nothing is sent. A file that is not an image or a text log, or that is over 5 MB, or a third file, is refused with a polite line saying which and why; a drop that mixes good and refused files keeps the good ones. To make it real, send the files where submit waits and check them again on your server.
Where does the report go?
Nowhere yet. The submit waits 800 milliseconds as a stand-in for a request, then shows a confirmation that says plainly it was saved in the demo only. Replace the timer in submit with your tracker's API: title, steps, severity, expected, actual and files hold everything.
Related
- Pro
Support Channels Contact
Support and feedbackA 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 feedbackA 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
Star Rating Feedback Contact
Support and feedbackA product feedback form for a roadmap tool in a card in card: five named stars with a word that follows the choice, switch-on topic chips and a message, ending in a confirmation that lists what was chosen.
- Pro
Photo Access Repair Contact
Repairs and claimsA 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
Add Another Pet Contact
Visits and servicesA visit request for a pet sitter that grows with the household: a cell for each pet (species, name, age, vaccinations) that you add and remove, then services, a first-visit date and contact details on ruled bands.
- Pro
Resolution Ladder Complaint Contact
Support and feedbackA complaint form in a card in card: four resolution cards one per row, each with its handling time, an incident date, an order number checked against its shape, and a switch that adds a Manager review badge.