LogoutButton
Log out the current customer. Runs useLogout; session teardown is
delegated to AuthProvider's onLoggedOut seam — this never touches cookies.
import { LogoutButton } from "@evolve-storefront/feature-auth/logout-button";Renders inside AuthProvider.
Preview
Usage
// AuthProvider's onLoggedOut tears down the session; this never touches cookies.<LogoutButton onLoggedOut={() => router.push("/")} />;Props
| Prop | Type | Description |
|---|---|---|
type? | "button" | "reset" | "submit" | |
isPending? | boolean | The action is running. The button keeps its label, so its width and
accessible name hold, shows a spinner and is |
variant? | ButtonVariant | |
tone? | ButtonTone | |
isIconOnly? | boolean | The button has no visible label, so it is square. Structural rather than a size: it says the button has nothing to be wide for, and says nothing about how big — the brand's control tokens still decide that. MoreNot inferred from the children. A kebab menu is as often a glyph or an SVG
as an |
asChild? | boolean | |
data-component? | undefined | A button's identity is not a caller's to rename — see |
onLoggedOut? | (() => void) | Called after a successful logout (alongside the provider's |
children? | ReactNode |
Any other props go to the root element, like on a plain HTML element.

