Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Suspicious Activity Login Block for React

A page that reports a blocked sign-in after the fact: an incident timeline of three events, the facts of the attempt, then Secure my account (which asks for the password) or This was me.

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

Tell people what happened and let them settle it in one step, with this suspicious activity login block for React with Base UI. It's the "we blocked a sign-in" page of Cardwren, a credit card app: a whole screen with the page's rails and one band across it, a centred header over two columns on wide screens and one column on phones. At the start, a hand-built incident timeline of three events with fixed times: a wrong password, the sign-in blocked (the only event with a Status dot, and it says Blocked in words too) and an alert emailed. At the end, a list of facts about the attempt (the place, the device, a network address with its last part hidden, the time) over a Password Input, the one Shine Button, Secure my account, and a ghost Button, This was me. Securing the account waits a moment and then shows what a real product would have done: ended 2 sessions, revoked 1 sign-in token, required a password change. It's built from Password Input, Field, Status, Button, Shine Button and Guides, with a CSS entrance only. For sign-ins that were stopped and need an answer.

FAQ

What stays in the page, and how do I wire it for real?

Everything. The events, the place, the device and the address (an address from a documentation range, with its last part hidden) are typed text, any password that is not empty is accepted, and nothing is ended, revoked or stored. In a product, Secure my account should re-check the password on your server, end the other sessions, revoke refresh tokens, flag the account to require a new password and write an audit entry; This was me should record the device as known.

Why does securing the account ask for the password?

Because it changes the account: it signs devices out and forces a password change, which you do not want a stranger on an unlocked computer to trigger. The field says Any password works in this demo, and an empty one is refused in words with focus on the field.

Where is colour used?

Only on one small status dot beside the blocked event, which also says Sign-in blocked in words. Every event has its own glyph (a key, a cancel mark, an envelope), the facts are plain text, and the results use a tick and a heading instead of green or red.

What changes on a phone?

The facts and the decision come first, so Secure my account sits on the first screen, and the timeline follows. Each event's one-line detail becomes screen-reader text to keep the page short; the title and the time stay visible.

What does This was me do?

It waits a moment and shows Marked as safe: Cardwren would record the attempts as yours and stop warning about them, and the demo stored nothing. Both results replace the form in the same space, which is already as tall as the taller result, so the page never changes height; Start over returns focus to the password field.

Is it usable with a keyboard and a screen reader?

Yes. The timeline is an ordered list with each event as a heading and a time element, the facts are a description list, the password field has a visible label and a hint tied to it, and the result takes focus on its heading while the status line says what happened.

  • Pro

    Account Locked Login

    Recovery and reset

    A locked-account page for a point-of-sale system that draws the lockout ladder, marks the rung the account is on with a fixed unlock time, and offers an unlock link by email or a password reset.

  • Pro

    A split sign-in page that asks whether a sign-in from far away was you: a drawn map with two places and an arc, a list of facts, and two answers, This is me and Not me.

  • Pro

    Sign-in Alerts Account

    Sessions and devices

    Sign-in alerts as a list and a reading pane in one panel: tabs for Needs review and Resolved, severity as an icon and a word, unread dots, and a pane with two actions, This was me and Secure my account with three steps to tick.

  • Pro

    Sign-in History Account

    Sessions and devices

    Every sign-in attempt in the last 14 days in a sortable, searchable table with failed attempts marked by an icon and a reason, rows that open to the user agent and steps, pages of 5 or 10 and four derived figures.

  • Pro

    Device Approval Login

    Codes and approvals

    A sign-in screen with a drawn phone: it asks whether the request is you, shows three number buttons, approves the matching one, denies a wrong one and points Deny to a password change.

  • Pro

    A sign-in page that shows why it is asking: six weighted signals add up to a score, a three-zone band marks it, and the question follows the zone: nothing, a six-digit code, or a block.