X Enterprises
Impersonation

ImpersonationBanner

Warning banner displayed when an admin is actively impersonating a user.

ImpersonationBanner

Renders a persistent warning banner at the top of the page when an admin session is impersonating another user, displaying the impersonated user's name and a "Stop Impersonating" button to end the session.

Components

<XAdminImpersonationBanner />

Displays a prominent colored banner with the impersonated user's identity and a stop-impersonation action. Should be placed in the app layout so it appears on every page during an impersonation session.

<XAdminImpersonationBanner />

Props

PropTypeDefaultDescription
endpointstring'/api/admin/impersonation'Base API endpoint
colorstring'yellow'Banner background color (tailwind color name)
showUserbooleantrueDisplay the impersonated user's name and email
autoHidebooleanfalseHide banner when not impersonating (uses v-if internally)

AI Context

component: XAdminImpersonationBanner
package: "@xenterprises/nuxt-x-app-admin"
category: Impersonation
use-when: Showing a persistent warning to admins that they are currently impersonating another user, with a stop action
Copyright © 2026