Sessions & Devices
Everywhere an account is signed in, with an unfamiliar session flagged and a way to sign each out.
PROGet Sessions & Devices and 168 other Pro components with pro lifetime — Get Pro
- Category
- Auth
- Access
- ProPro · unlocked
- Source
- 219 lines · one file
- States
- 6 drawn
- Added
- 3 Nov 2026
The decision inside it
Signing out everywhere else keeps this device
Cleaning up sessions shouldn't log you out mid-task. This device has no sign-out button in the list, and Sign out everywhere else confirms that this one stays signed in.
When to use it
Use Sessions & Devices on a security settings page to show where an account is signed in and sign sessions out. To turn on two-factor use Two-Factor Setup.
Installation
How you get it
Paste this into Claude Code, Cursor, Codex or any coding agent. It installs the file and uses it as it is, instead of writing a new one.
Use Liro's Sessions & Devices for this.
Install it: npx shadcn@latest add @liro/sessions-devices
(the @liro registry is set up in components.json, with LIRO_KEY in .env.local)
Import it from @/components/ui/sessions-devices.
Do not rewrite or restyle it. Pass my data through its props
and keep its built-in states.For the full brief with every prop and the mistakes assistants usually make, use Copy prompt above. Pro components install through the @liro registry with your CLI token: see the Namespaced tab.
Usage
import { SessionsDevices, type DeviceSession } from "@/components/ui/sessions-devices";
export function SignedInDevices({ sessions, api }: {
sessions: DeviceSession[];
api: { revoke: (id: string) => Promise<void>; revokeOthers: () => Promise<void> };
}) {
return <SessionsDevices sessions={sessions} onRevoke={api.revoke} onRevokeOthers={api.revokeOthers} />;
}API reference
“Copy prompt” above puts a full brief on your clipboard, install command, dependencies, props, and the mistakes an assistant usually makes with this component.
Props
Read from the component’s own TypeScript interface when the site is built, so this table cannot drift from the file you install.
| Type | Notes | ||
|---|---|---|---|
sessions | DeviceSession[] | Yes | – |
onRevoke | (id: string) => void | Promise<void> | No | Ends one session. May return a promise. |
onRevokeOthers | () => void | Promise<void> | No | Ends every session except this one. May return a promise. |
title | string | No | – |
now | Date | number | No | – |
look | Look | No | – |
Dependencies
npm packages
clsxframer-motionlucide-reacttailwind-mergeLiro foundations, installed alongside it
liro-themebuttonStates
All of them are drawn by the component. None is left for you to design.
- Sessions
- Unfamiliar session
- Confirm
- Signing out
- Failed
- Only this device
Accessibility
- Keyboard reachable throughout, in visual order
- Focus trapped in overlays, Escape closes them
- Focus returns to whatever opened it
- Live regions announce what changed, not that something did
- Honours prefers-reduced-motion
Responsive behavior
- Sizes to its container, not the viewport
- Usable from 320px up
- Pointer-based interaction, so trackpad and touch both work
- No hover-only affordances