Skip to content
rw3iss Auth

LogoutButton

atom @rw3iss/auth-client/preact/atoms/LogoutButton framework-adapters/preact/components/atoms/LogoutButton.tsx ↗

Single-shot logout button. Calls AuthClient.logoutCurrent() and surfaces in-flight + error state from the underlying action hook. Disabled while pending to prevent double-submits.

Usage

import { LogoutButton } from '@rw3iss/auth-client/preact/atoms';
<LogoutButton
onComplete={() => navigate("/login")}
/>

Props

NameTypeDescription
clientAuthClient
labelstringOverride the button label. Default “Sign out”.
onComplete() => voidCalled after a successful logout.
classNamestringExtra className.
variant'primary' | 'ghost' | 'danger'style variant — “primary” | “ghost” | “danger”. Default “ghost”.