docs / components/user-button
UserButton
Give signed-in users a compact account menu and sign-out action.
Basic usage
import { UserButton } from "@vulyo/nextjs";export function AccountMenu() { return ( <UserButton showName afterSignOutUrl="/" userProfileMode="modal" /> );}Profile modes
Use modal to open UserProfile in a dialog. Use path when account management has its own route; userProfileUrl is required in path mode.
<UserButton userProfileMode="path" userProfileUrl="/account" afterSignOutUrl="/sign-in"/>Properties
| Property | Description |
|---|---|
| showName | Show the display name or email beside the avatar. |
| afterSignOutUrl | Destination after the current session is revoked. |
| userProfileMode | Open account management in a modal or at a path. |
| userProfileUrl | Required destination when userProfileMode is path. |
| appearance | Overrides the provider-level appearance. |