Account Security & Preferences

React Account Settings & Profile Guardrails

Account settings components guard email changes, active user sessions, recovery contacts, and unsaved form modifications. They ensure deliberate changes and re-authentication gates for high-risk account operations.

Settings kit

Email changes, sessions, recovery contacts and edits that never saved.

pnpm dlx shadcn@4.21.0 add @bollard/account-settings-pack

Components in Account settings (46)

React 19+ · Tailwind v4 · shadcn
Account Deletion ReadbackStyled

Reads back everything an account deletion loses or keeps charging for, so users do not delete more than they expect or keep paying an app store.

Stops: Deleted account still billing subscriptions
Recovery Contact CooldownStyled

Makes a pending recovery email or phone change visible during its hold, so the real owner can cancel a takeover attempt in time.

Stops: Helps the owner catch a swapped recovery contact before it takes effect
Session ListStyled

Keeps the current device safe while cleaning up sessions: it's pinned and marked, excluded from "sign out all others", and confirmed inline.

Stops: Signed out own device by mistake
Sign-in ApproveStyled

Replaces one-tap sign-in approval with typing the number shown on the sign-in screen, to make MFA-fatigue approvals harder.

Stops: Helps prevent approving an attacker's sign-in through push fatigue
Type to ConfirmStyled

Confirmation dialog that unlocks a destructive action only after the exact name is typed, flagging a typo as it happens.

Stops: Wrong repo deleted on reflex
Danger ZoneStyled

Keeps destructive settings visible but locked until deliberately unlocked, so a stray click doesn't delete or transfer something.

Stops: Stray click deleted from settings
Guarded SwitchStyled

Puts a lift-up cover over a critical switch like maintenance mode or a kill switch, so a stray click can't flip it.

Stops: Helps prevent a kill switch flipped by accident
Reauth GateStyled

Asks the user to re-confirm with a passkey, password or PIN before a sensitive action, so an unattended signed-in screen is harder to misuse.

Stops: Helps prevent a sensitive action on an unattended signed-in screen
Revoke Access PreviewStyled

Shows what removing a member, token or app will break: owned work left unowned, sessions ended and integrations that stop.

Stops: Removed member's integrations stopped working
Transfer OwnershipStyled

Reads back what an ownership transfer moves and keeps, warns about an outside email or a recipient whose plan can't own it, and waits for acceptance.

Stops: Ownership transferred to the wrong email
Cancel ReadbackStyled

Reads back exactly when access ends, what is lost and what is refunded before someone cancels, and ends on a receipt with an undo.

Stops: Cancelled without knowing when access ends
Reset PreviewStyled

Shows only the settings a reset would actually change, current → default, so a reset to defaults doesn't wipe customisations unseen.

Stops: Reset to defaults wiped customizations
Retention ChangeStyled

Says exactly what a shorter data-retention period will delete and when, and suggests an export before it purges.

Stops: Shorter retention purged months of data
Seat ReduceStyled

Makes lowering a seat count an explicit choice of who loses access, with the new bill and what happens to their work.

Stops: Fewer seats locked out an active admin
Password Policy InputStyled

Reads an admin's password rules back against NIST SP 800-63B-4 and shows what they do to real passwords, so the rules don't make accounts weaker.

Stops: Helps catch password rules that weaken accounts
Email Change GuardStyled

Catches typos in a new account email and keeps the old address active until the new one is verified, so nobody locks themselves out.

Stops: Locked out by a typo'd new email
Password Hint GuardStyled

Spots the password inside a password hint or security answer, even reversed, spaced out or in leetspeak, without ever showing the password.

Stops: Password hint reveals the password
Username InputStyled

Reads back the exact handle that will be registered and blocks reserved words, case-only duplicates and lookalikes of existing names.

Stops: Handle impersonates someone else
Shortcut RecorderStyled

Checks a newly recorded keyboard shortcut against browser and OS reserved keys and the app's own bindings before it's saved.

Stops: Shortcut clashes with Ctrl+W
Timezone PickerStyled

Finds time zones by city, country or abbreviation and lists every meaning of ambiguous ones like IST or CST instead of guessing.

Stops: Meeting scheduled in the wrong zone
Scope PickerStyled

Reads back what an API key will be able to do in plain words, flags risky scopes and suggests trimming to what was actually used.

Stops: API key with admin powers leaks
Billing Period InputStyled

Reads a recurring price back in every billing period and catches a yearly price typed into the monthly field.

Stops: Yearly price typed into monthly plan
SSH Key InputStyled

Catches a private SSH key pasted where a public key belongs, plus weak, truncated or malformed public keys, before they're saved.

Stops: Private SSH key pasted where a public key belongs
Webhook URL InputStyled

Judges a webhook URL for the environment it's saved to and warns when an edit only changed www or a trailing slash, which senders treat as a failed redirect.

Stops: Webhooks pointed at localhost
List PasteStyled

Splits a pasted list of emails or names, counts valid, duplicate and invalid items, and removes the bad ones before you import or invite.

Stops: Messy pasted list imported
Webhook TestStyled

Checks a webhook URL the way the sender will before it's saved: reachability, https, redirects, slow replies and login pages.

Stops: Webhook saved to an unreachable URL
Passkey Name PromptStyled

Prefills a distinct name right after a passkey is created, so the security page isn't a list of identical "Passkey" rows nobody can tell apart.

Stops: Identical passkeys nobody can tell apart
Irreversible Diff BadgeStyled

Marks fields that can't be changed back and, before save, lists only the permanent fields that actually changed, from → to.

Stops: Permanent field changed without warning
Backup CodesStyled

Makes users save their recovery codes and type one back before continuing, so they aren't locked out later by codes they never kept.

Stops: Locked out with unsaved backup codes
Recovery CheckStyled

Shows what would lock a user out if they lost their phone: stale recovery contacts, no backup method, or one phone holding both keys.

Stops: Lost phone meant lost account
Unsaved Changes BarStyled

Names every unsaved field, warns before the tab closes, saves on Ctrl/⌘+S and asks twice before discarding.

Stops: Left page with unsaved edits
Terms ChangesStyled

Shows what changed in updated terms since the version a user accepted, and keeps Accept locked until each change has been on screen.

Stops: Terms accepted without seeing changes
Crop GuardStyled

Checks a crop against faces, headlines and platform overlays, so a profile photo or Story doesn't cut off a face or hide text under the UI.

Stops: Profile crop cut off face
Security Event LogStyled

Highlights risky account changes from other devices and groups a takeover-shaped burst, with a "This wasn't me" path the user can review.

Stops: Account takeover buried in the activity log
Acting As BannerStyled

A sticky bar that says whose account you are acting as, and labels destructive buttons with the org they act on, so support staff don't edit the wrong data.

Stops: Edited a customer's data as myself
Timezone MismatchStyled

When the device's time zone differs from the account's, shows both clocks and asks once which to use, so times aren't misread while travelling.

Stops: Misread every time by hours while travelling
Quota ForecastStyled

Projects current usage to the reset date and warns when you'll run out first, so a usage limit isn't hit by surprise.

Stops: Hit the usage limit by surprise
Presenter ModeStyled

Removes marked emails, amounts and keys from the page while presenting, so they don't leak on a screen share.

Stops: Leaked a key on a screen share
Account Switch GuardStyled

Names which account an action runs as, and notices when another tab switched accounts, so nobody posts from the wrong one.

Stops: Posted from the wrong account
Permission Pre-AskStyled

Explains why a permission is needed before the browser's one-shot prompt, and shows this browser's re-enable steps if it is blocked.

Stops: Wasted the browser's one permission prompt
Experimental BadgeStyled

A badge that opens the concrete risks of a beta feature and a one-tap way back to the stable version, so people don't trust it blindly.

Stops: Trusted a beta feature and lost work
Role PreviewStyled

Shows what a chosen role can and can't do, the diff from the current role, and a smaller role when the pick adds risky permissions.

Stops: Gave a teammate admin by mistake
Visibility PickerStyled

Makes widening who can see something an explicit step that shows who gains access; narrowing stays instant.

Stops: Made a private doc public by accident
Share LinkStyled

Reads every share-link setting back as one sentence and warns about public edit access, links that never expire and widening an already-copied link.

Stops: Anyone with the link could edit
Plan Change ReadbackStyled

Before an upgrade or downgrade, reads back today's charge, credits, the next bill and any usage over the new plan's limits, so nobody is surprised by a charge or lost data.

Stops: Downgrade deleted data over the limit
Secret FieldStyled

Shows an API key masked but recognisable, re-hides it on a timer or when the tab is hidden, and copies the real value instead of dots.

Stops: Masked API key pasted as dots

Frequently Asked Questions about Account settings Guardrails

How do I warn users when they navigate away from an unsaved form?

Unsaved Changes Bar (`unsaved-changes-bar`) monitors dirty form state and shows a persistent warning bar before page unloads. Install with `npx shadcn@4.21.0 add @bollard/unsaved-changes-bar`. Limitation: browser tab crashes cannot be intercepted.

How do I confirm email changes with re-authentication?

Reauth Guard (`reauth-guard`) prompts for current password or passkey verification before updating sensitive profile fields. Install with `npx shadcn@4.21.0 add @bollard/reauth-guard`. Limitation: session verification must be validated on the backend.

How do I safely show active sessions and revoke devices?

Session List (`session-list`) displays device type, IP, and location for active logins with instant revoke triggers. Install with `npx shadcn@4.21.0 add @bollard/session-list`. Limitation: session token revocation must be handled by your session store or Redis.

How do I prevent accidental timezone mismatches in user profiles?

Timezone Select (`timezone-select`) detects the browser timezone and alerts if it differs from the saved account preference. Install with `npx shadcn@4.21.0 add @bollard/timezone-select`. Limitation: users traveling between regions must explicitly confirm changes.