Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Sign-in Methods Settings Block for React

A sign-in methods settings panel with five methods you can switch and reorder, a drawn sign-in card that is redrawn from them, a last-method guard and a lockout rule that restates itself.

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

Decide how people sign in and see the result before you save it, with this sign-in methods settings panel for React with Base UI. A hairline frame with a plus mark on each corner holds five rows (password, email link, passkey, Google and GitHub), each with a Switch, a short line about it and a pair of Move up and Move down buttons. Beside the rows, and above them on a phone, a greyscale sign-in card is drawn from exactly what is on: only the enabled methods, in the order they are listed, the first as the solid button and the rest as outline buttons, with a sentence under it that says the same in words. The last method that is on can't be turned off: the switch stays on and a message says why. A second band sets how many wrong passwords lock an account and for how long, with a Number Input and a Native Select, and a sentence that restates the rule or says it only applies once Password is back on. The action foot counts unsaved changes beside a Shine Button that saves them and an outline button that discards them. It's built from Switch, Number Input, Native Select, Field, Button, Shine Button and Guides, with a CSS entrance only. Google and GitHub are named in text with a two-letter tile and nothing connects. For a product that offers more than one way in.

FAQ

How do I use my own methods?

Edit METHODS at the top: each has an id, a name, a hint, the line its button says on the drawn card and, for a service, the two letters of its tile. SAVED holds which are on and in what order, plus the lockout. The drawn card, the sentence under it, the counts and the lockout sentence are all worked out from that state, so nothing is typed twice. Put your own logos in the tile slots if you have the rights to them; the tiles are lettermarks on purpose.

What does the last-method guard do?

If only one method is on and you switch it off, the change is refused: the switch is put back, a message under the list says nobody could sign in, the status line says it too and focus stays on that switch. Any other method can be turned off freely, and turning one back on never needs a check. Enforce the same rule on your server, since a form on a page can't stop a request that skips it.

How does ordering work, and who can use it?

Move up and Move down are real buttons named for the method ("Move Passkey up"), with the first one's Up and the last one's Down left in place but saying there is nowhere to go. After a move, focus stays on the button you pressed, or on the other one when that one has reached an end, and the status line says where the method went ("Moved Passkey to position 1 of 5."). Reordering counts as one change. Methods that are off are moved too, so they keep their place when they come back. There is no drag handle, so it works the same by keyboard and by touch.

What stays local, and how do I make it real?

Everything. Nothing signs in, saves or connects: the switches, the order and the lockout live in this page's state, Save only says what it kept, and Google and GitHub are text. To make it real, send the saved methods and their order to your auth service, render the real sign-in page from the same list, and apply the lockout where passwords are checked. Brute-force limits belong on the server, per account and per address.

How does it look on a phone, and is it accessible?

The drawn card comes first, then the rows, one per line with the same two move buttons and the switch, then the lockout band stacked, and the action foot is pinned to the bottom of the screen. The drawn card is hidden from assistive technology and restated by the sentence under it; every row is named ("Google sign-in") and says where it stands ("Google, shown 3" or "off"), and the status line is a polite live region present from the start.

  • Pro

    Password Policy Settings

    Sign-in and security

    A password policy settings panel with rules for length, number, symbol, case, a breached list, expiry and history, and a field that tests a password against them with one verdict that names the first rule it fails.

  • Pro

    A multi-factor policy settings panel with choice cells for who must use it, allowed methods with a keep-one guard, a grace period that prints the start day, and a coverage meter that draws the people who have not set one up.

  • Pro

    Identity Provider Settings

    Sign-in and security

    An identity provider settings panel with a protocol picker, an https-only issuer, a masked client secret, a claim mapping table that shows what each claim resolves to in a sample token tree, and a provisioning rule.

  • Pro

    Session Policy Settings

    Sign-in and security

    A session policy settings panel that leads with the sentence the settings amount to, two sliders with stops for the idle timeout and the longest session that hold each other to one rule, a device limit and an end-all-sessions dialog.

  • Pro

    Social Buttons Login

    SSO and providers

    A full-height provider-first sign-in page for a photo-sharing app: four hairline rows for Google, GitHub, Apple and Microsoft with a Last used badge that moves, and an email form that opens in place.

  • Pro

    Passkeys Account

    Sign-in methods

    An account's passkeys: a ruled list of what each one is, when it was created and last used, a name you edit in place, a guarded Remove, and a dialog from the header that names a new passkey.