Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Details Panel Split Contact Block for React

A contact split for a design studio: a tall tinted panel of email, phone and address with a copy button each, hours and profile links, beside a raised brief form.

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 split for React with Base UI, divided by a hairline that meets the page's top rule with a + mark. At the start, a tall panel tinted a step off the page: a large headline, then the studio's email, phone and address as ruled rows in display type, each with a copy button, and at its foot the opening hours and a group of links to the studio's profiles. At the end, a raised card with the brief form: name, email, an optional link and what you are making. Submitting checks the required fields, shows each problem under its field and moves focus to the first one; a valid brief turns into a confirmation in the same space, which takes focus. The block follows your theme: the panel is a tint of the page, not a dark scope, so it is light on a light page and dark on a dark one. It's built from Field, Input, Textarea, Copy Button, Button Group, Button, Guides and Shine Button.

FAQ

Why is it called dark card if it follows the theme?

The slug keeps shadcn.io's URL. The original made its details panel a solid primary-colour surface; here the emphasis comes from structure instead: a tinted panel, large type and ruled rows. Nothing is a fixed colour, so the panel is light in a light theme and dark in a dark one, and the primary colour stays on the one submit button.

What do the copy buttons do?

Each copies its row's value (the email address, the phone number or the full street address) to the clipboard and swaps its icon for a check for three seconds. A screen reader hears "Copied" through a polite status inside the button, or "Couldn't copy" if the browser refuses the clipboard (a page not served over HTTPS has none). The value itself is still a link you can select: the email and phone open your mail and phone apps.

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 your own call: details holds the name, email, link and brief. The link field is optional and unchecked; add a rule to problems if you want to require a real URL.

Are the email address, phone number and street real?

No. hello@dusklight.example uses the .example domain, which is reserved for examples, and +1 (415) 555-0163 is in the 555-0100 to 555-0199 range set aside for fiction. The street is made up. Replace EMAIL, PHONE and ADDRESS at the top of the file. The phone number keeps its order in a right-to-left layout.

How does it fit on a phone?

Below lg the parts stack: the headline in its tinted band, the form straight after it, then the contact rows and the profile links in a second tinted band. The email shrinks from text-2xl to text-lg and wraps rather than scrolling sideways at 320 pixels, and the submit button goes full width. The headline and the card fade up once on load; with reduced motion they simply appear.

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

  • Pro

    A contact split for a photo lab: a short form beside a framed drawing of the email thread, whose first bubble fills with your name and words as you type.

  • Pro

    A hero-sized contact section for an architecture practice: a tinted band with a large headline and three ways to reach the studio, and a raised form panel that overlaps the band's lower edge.

  • Pro

    A reverse split contact hero on solid rails: an abstract dot map with a pulsing marker per office fills the first half up to a divider, beside a headline, a Shine Button and three offices as ruled rows.

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