Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Split Panel Phone QR Code CTA Block for React

A split CTA for a habit app between solid rails: copy and a Shine Button that emails the link beside a phone, in a hairline frame, whose screen is a scannable QR code.

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 split call to action for getting an app onto a phone, for React with Base UI, drawn between solid rails. At the start are a badge, a headline, a short paragraph, three ticked points and two actions: a Shine Button "Email me the link" that opens the visitor's mail app with the address filled in, and a quiet outline "See what is in the app". At the end, past a solid divider that meets the top rule, a phone built from plain CSS sits in a hairline frame with + marks on its corners; its screen is a real, scannable QR code. The product is Fernwick, a made-up habit tracker, so swap in your own. It's built from QR Code, Badge, Status, Shine Button, Button and Guides, with Lucide icons, Tailwind CSS and a CSS entrance that stays still under reduced motion. The block follows the theme. On a phone the text comes first and the button lands on the first screen. Made for app download pages where most visitors are on a desktop.

FAQ

How do I change where the QR code points?

The code is generated in the browser from APP_URL at the top of the file; change it to your download page, or to a smart link that sends iPhones and Android phones to their own store. The same address goes into the body of the email link, so the two always agree. Use a short, stable URL: shorter addresses give a simpler code that scans faster at small sizes.

Will the code scan in every theme and in dark mode?

Yes. The code's frame is always black on white, whatever the preset or the page's theme, and it sits on the phone's screen with a margin around it, so scanners get the contrast and the quiet zone they need. Don't recolour it to match a theme: a low-contrast code is the most common reason one fails to scan.

Can I put a screenshot on the phone instead?

The phone is a few elements of CSS: a bezel, a notch, a home bar and a screen with a fixed 1:2 shape and a width of min(12.5rem, 55vw), so it never overflows a narrow screen. It sits in a frame drawn with Guides on a tinted box, with + marks on its corners. Replace the screen's content with an image and keep the bezel; keep the QR code too if you want visitors on a desktop to be able to scan it.

How is the QR code described to assistive technology?

The code is an image with the name "QR code that opens the app download page", and the text around it, "Scan to get the app" and "Point your camera at the code", is real text. Since a screen reader user can't scan, the "Email me the link" action is the equivalent path, and the paragraph says so.

What does the email link do?

It is a mailto: link: it opens the visitor's mail program with a subject and the app address in the body, so they can send it to themselves and open it on their phone. It sends nothing from your server. If you would rather collect the address, swap it for the "text me the link" form in the dark store-buttons block.

What shows on a phone?

Below the large breakpoint the two parts stack, text first, so the Shine Button is on the first screen, and the framed phone follows under a solid rule. On a phone the code is only a picture of what a desktop visitor would scan, so consider hiding the phone there and keeping the two actions.

  • Pro

    A centered card-in-card CTA for a mobile app with iOS and Android download links, and a text-me-the-app form in a ruled band that has a country-code select and turns into a confirmation.

  • Pro

    A reverse split CTA built around an editable address bar in a browser frame: type a name, see whether it is available and watch the page mirror it before you claim it with a Shine Button.

  • Pro

    Split Panel Team Picker CTA

    Pickers and toggles

    A split CTA where visitors pick the engineer they want to talk to from four choice cards with initials, role and availability, a Shine Button that names their choice, and a closing band of assurances.

  • Pro

    Split Phone Frame Hero

    Mobile and media

    A split hero for a mobile app: copy, store links and social proof beside a phone frame that slides out of a hairline frame, cut off at its foot.

  • Pro

    A reverse split hero for a mobile app: two phones rise from the foot of a tinted panel on the start side, with a Shine Button to the App Store, an outline link to Google Play and a rider count at the end.

  • Pro

    Phone Frame Mockup Hero

    Mobile and media

    A centred showcase hero for a mobile app on solid rails: store links with a Shine Button, a phone showing the app between two cards, fading out over a ruled band of three stats.