<SignOutButton />
The SignOutButton component signs out the current user when clicked. It is auto-registered by the Nuxt module and requires no imports.
Usage
Basic Usage
components/NavBar.vue
<template>
<SignOutButton />
</template>
Custom Label
components/NavBar.vue
<template>
<SignOutButton>Log out</SignOutButton>
</template>
Using the Default Slot for Full Control
components/NavBar.vue
<template>
<SignOutButton>
<template #default="{ signOut, isLoading }">
<button :disabled="isLoading" @click="signOut">
{{ isLoading ? 'Signing out...' : 'Sign Out' }}
</button>
</template>
</SignOutButton>
</template>
Slots
| Slot | Slot Props | Description |
|---|---|---|
default | { signOut: () => void, isLoading: boolean } | Custom content rendered inside the button. If omitted, renders a default "Sign Out" button |
Props
| Prop | Type | Required | Description |
|---|---|---|---|
preferences | Preferences | ❌ | Customization options for i18n and theming |