Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Icon Medallion CTA Block for React

A split security prompt for a password vault: the headline and two actions at the start, and at the end a settings panel where a medallion swaps from an alert shield to a checked one when the two-factor switch turns 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

Nudge people to secure their account with this split prompt for React with Base UI. Between solid rails, the start side holds the headline, a sentence about Pinegate (a fictional password vault), the Shine Button and a ghost "Remind me later"; a solid divider that meets the top rule separates it from a settings panel in a hairline frame with + marks on its corners. In the panel a round medallion sits beside the labelled two-factor switch; turning the switch on swaps the medallion's alert shield for a checked one with a foreground ring, and the Shine Button changes from "Enable 2FA" to "Manage 2FA". "Remind me later" is a toggle that sets a reminder, with a check beside it. It's built from Guides, Swap, Switch, Shine Button and Button, with CSS transitions and your theme's tokens, and nothing moves under reduced motion. On a phone the panel stacks under the text with a rule between them, so the main button stays on the first screen. Made for post-sign-up checklists, security nudges, settings prompts and any block where one choice should visibly change the state of the page.

FAQ

What does the switch do, and how do I connect it?

It's a controlled switch named "Two-factor authentication": its state, on, drives the medallion, the helper text and the button label, so the whole card shows one source of truth. Here it only changes this card. To wire it up, call your API from the toggle handler: turn it on once your server confirms, and set the state back if the request fails, so the card never claims protection the account doesn't have.

How does the medallion change, and is it announced?

The icons swap with a short scale and fade, and the ring and fill change with a colour transition; with reduced motion on, both are instant. The medallion is decoration, so it's hidden from assistive technology; instead, a polite status line, empty until someone acts, says "Two-factor authentication is on" or "off", and "We'll remind you later" for the reminder. Nothing is announced when the page loads.

Do the labels change the layout?

No. The helper text beside the switch and the button's label are each rendered in both versions in one grid cell, and the one that isn't current is invisible, so the cell has the width of the longer text and nothing around it moves when the state changes. The hidden text is out of the accessibility tree, so a screen reader reads only the current one.

What does Remind me later do?

It's a toggle button with aria-pressed: pressing it sets reminded and shows a check beside its label, and pressing it again clears it. Connect it to however you postpone prompts, for example a cookie or a field on the user's profile. It's disabled once two-factor is on, since there's nothing left to postpone.

Where does the main button go?

The Shine Button is a link, to your setup flow when the switch is off and your security settings when it's on: change its href with the state if they differ. A band of light sweeps across it once on hover and keyboard focus, and with reduced motion it fades in where it stands. The button renders the link it's given with render, with nativeButton={false}.

Does it work in right-to-left languages?

Yes. The two columns swap sides with the page direction, and in the panel the medallion sits at the start and the switch at the end. The medallion and the shield icons are symmetric, so they need no change.

  • Pro

    Shield Seal CTA

    Trust and security

    A band guarantee call to action: the headline, a Shine Button and an outline link on the start side, and a flush tinted cell on the end side with a seal of text turning slowly round a shield, with a pause button.

  • Pro

    A centred card-in-card guarantee that follows your theme: a headline naming the refund window over a band of three terms on shared hairlines, each promise with its value at display size, and one Shine Button.

  • Pro

    Feature Card Trio CTA

    Pickers and toggles

    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.

  • Pro

    Polaroid Stack CTA

    With a closing band

    A centred statement for a photo album app, with a floor band at the foot where three tilted polaroid links peek up, then lift, straighten and develop from a soft blur to clear on hover or focus.

  • Pro

    A reverse split hero for a theme editor: two preview cards, one light and one dark, in a hairline frame beside a sun and moon switch, a Shine Button and an outline button.

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