<ThunderIDSignOutButton />
The ThunderIDSignOutButton 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>
<ThunderIDSignOutButton />
</template>
Custom Label
components/NavBar.vue
<template>
<ThunderIDSignOutButton>Log out</ThunderIDSignOutButton>
</template>
Using the Default Slot for Full Control
components/NavBar.vue
<template>
<ThunderIDSignOutButton>
<template #default="{ signOut, isLoading }">
<button :disabled="isLoading" @click="signOut">
{{ isLoading ? 'Signing out...' : 'Sign Out' }}
</button>
</template>
</ThunderIDSignOutButton>
</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 |