Impersonation Banner

A top of page bar telling support staff which user account they are viewing as, with an Exit button to end the session. Common in admin and support tools.

src/registry/ui/impersonation-banner.tsx/r/impersonation-banner.json

Installation#

bash
npx shadcn@latest add @minidev/impersonation-banner

MiniDev UI is in the shadcn registry directory, so the short form works with no setup. Older CLI versions can use the full URL: npx shadcn@latest add https://ui.minidev.pro/r/impersonation-banner.json

Usage#

tsx
import { ImpersonationBanner } from "@/components/ui/impersonation-banner"

export function Example() {
  return (
    <ImpersonationBanner user="casey@acme.com" />
  )
}

API reference#

ImpersonationBanner props
PropTypeDefault
user*string-
onExit() => void-
classNamestring-

* required

Dependencies#

npm

React only

Built from

Examples#

All dashboard components