Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Split Panel Inbox Zero CTA Block for React

A split CTA for an email app: the headline, a status line and a Shine Button beside a working inbox panel that runs flush to the rail and the section's foot. Archive any of five messages and the row folds away, the count follows, and an Inbox zero state appears at the end.

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

Sell the feeling of an empty inbox by letting visitors reach it, for React with Base UI. A split panel between solid rails puts a headline, a short paragraph, a live status line and a Shine Button at the start, and, past a solid divider that meets the top rule, a small inbox of five messages at the end. The inbox runs flush to the end rail and the section's foot, with a rounded start corner. Each row has an archive button: press it and the row folds away, the "to go" count drops and the status line says what was archived. Archive the last one and an "Inbox zero" state fades in where the list was, with a button to restore the messages and try again. The panel never changes height, so nothing around it moves. The product is Lanternmail, a made-up email app. It's built from Avatar, Badge, Button, Empty, Shine Button and Guides, with CSS transitions and your theme's tokens for every colour. On a phone the text comes first. For email clients, notification tools, support desks and any product about working through a queue.

FAQ

How do I change the messages?

Edit MESSAGES at the top of the file: each has initials, a sender, a subject, a snippet and a relative time such as "2m". Rows are a fixed height and their text shortens with an ellipsis instead of wrapping, which is what lets the panel reserve room for exactly five. If you add a sixth, raise the list's min-h-80 by one row (4rem) and the "five" in the paragraph and the status text.

Why doesn't the panel jump when the list empties?

The list and the Inbox zero state share one grid cell that is as tall as five rows. Rows fold away inside it and the empty state fades in over the space they leave, so the card keeps its height from the first message to the last. Under reduced motion the rows disappear at once and the empty state is there at once.

What do keyboard and screen reader users get?

Each archive button is named for its message, "Archive “Design review notes”", and the list is named "Messages". After you archive a row, focus moves to the next message's button, or to "Restore the messages" when it was the last, so you can keep going from the keyboard. A polite status line says what was archived and how many are left. Archived rows are inert and hidden from screen readers as well as from view.

How do I connect it to a real inbox?

Replace archive with a call to your API and update archived when it succeeds, keeping the status line as the confirmation. This demo only stores which messages are folded away, so "Restore the messages" brings them back; you will likely remove that button, and restore, from a real page.

Can I add an undo?

Yes: archived is a plain list of message numbers, so an undo is one more entry in the status line that removes the last one from it. Move focus back to that message's button when you do, the way restore does for the first.

How does it fit on a phone?

Below the lg breakpoint the copy sits above the inbox, which takes the full width, still flush to the end rail. Names, subjects and snippets truncate with an ellipsis and the archive button stays at the end of each row, so it reads at 320 pixels without scrolling sideways.

  • Pro

    A reverse split CTA for a project board: a working three-lane board ruled by solid hairlines and flush to the rail, beside the headline, a status line and a Shine Button. Each card's button moves it on and the counts, status and message follow.

  • Pro

    A split call to action beside a week-by-time availability grid on a framed card: pick a free slot and the Shine Button names it.

  • Pro

    A split call to action for a browser extension: the pitch and a Shine Button at the start, its popup with working bookmarks in a hairline frame at the end, and a closing band of three ruled benefits.

  • Pro

    A split CTA that gates a PDF: an email form and Shine Button beside a stack of paper pages in a hairline frame, the cover blurred and locked, with a closing band of chapters. Submitting unlocks the cover and offers a download with progress.

  • Pro

    A reverse split hero for an email app: a wide three-pane inbox that runs flush to the page's start rail, then the headline, a Shine Button and three ticks, above a band of three figures.

  • Pro

    A reverse split hero for a notifications product: a panel flush to the start rail with a stack of notification cards, then a divider, the headline, three checks and a Shine Button.