Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Feature Card Trio CTA Block for React

A split call to action on drafting lines for alert settings: a headline on one side of a hairline divider, and on the other three alert rows with a switch each, over a Shine Button whose label counts the alerts switched on.

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 closing section that asks for a small, concrete commitment, for React with Base UI. On the start side of a hairline divider sit a headline and a short line for Pennant, an invoicing app; on the end side three alert rows, Security, Billing and Product updates, each with an icon and a working switch, sit between two ruled lines with + marks on their corners. Under them the Shine Button reads "Enable 1 alert", and its number rolls like an odometer as switches are flipped; at zero it goes inactive and a hint beside it says why. Flipped on, a row's icon turns solid foreground; the Shine Button is the only primary control. It's built from Switch, Sliding Number, Shine Button and Guides, with CSS transitions only and your theme's tokens. For settings pages, onboarding steps and sign-up flows where letting people choose first makes the final click an easy one.

FAQ

How do I change the alerts?

Edit ALERTS at the top of the file: each has an id, a title, a one-line description and a Lucide icon. INITIAL lists the ids that start switched on (Security by default). The rows are a plain list, so two or five alerts work without changing the layout.

What does the button do?

It is a real button, not a link. At zero alerts it is aria-disabled and points at the hint with aria-describedby, so a screen reader hears why it is off. With one or more it saves: here that only sets a "Saved" message in the polite hint line, and in your app save is where the request goes. Flipping any switch afterwards clears the message.

How does the number in the button work?

SlidingNumber renders the real count as text for screen readers and rolls the visible digits with a CSS transition when it changes. The word after it switches between "alert" and "alerts". The rolling stops with reduced motion, so the digit just changes.

How are the switches named, and why are they grey?

Each switch is labelled with its row's title ("Security alerts") and has a larger invisible hit area for touch. They are controlled by one list of ids, so the count, the icon and the button label always agree. The switches are neutral (data-checked:bg-foreground), so the Shine Button stays the only primary element. Keyboard users move through the switches with Tab and flip them with Space.

How are the lines drawn?

The page column's rails and top rule come from Guides and join the block above and below. The divider is a border-s on the second column from lg, with a + mark where it meets the top rule. The rows' two ruled lines get their marks from a second Guides with rules="none". Below lg the columns stack and a rule with marks separates them.

How does it look on a phone?

The columns stack: the headline, then the rows, then the button, which stays on the first screen. The row descriptions stay available to screen readers but are hidden visually so the three rows stay short, and the hint reserves three lines so a longer message never moves the page.

  • Pro

    A card-in-card call to action for a team inbox with a working notification tray: the pitch and a Shine Button beside a tray where a button fires toasts, newest on top, each with Undo and close.

  • Pro

    A reverse split CTA for an automation platform: a search field over a 3 by 3 grid of integrations in cells that share hairlines, flush to the rail, beside a Shine Button. A search that finds nothing offers to request that tool.

  • Pro

    A reverse split CTA for a support assistant between solid rails: an ask-me chat window in a hairline frame at the start (pick a question, watch the assistant type, read its answer) and the headline, a sentence and the Shine Button at the end.

  • Pro

    A showcase hero between solid rails: an announcement link, a centred headline and a Shine Button, over three feature cells with overshooting hairlines, each led by a greyscale vignette of the feature.

  • Pro

    A split hero for a feature-flag service: the headline, a Shine Button and three ticks beside a narrow flags dashboard in a hairline frame, with environment tabs, rollout meters and a working switch on every flag.

  • Pro

    Language Chips CTA

    Pickers and toggles

    A split call to action for a product that speaks your users' language: the pitch and a Shine Button beside a framed greeting over a cloud of language chips that switch the greeting and the button's label, each in its own language and direction.