Skip to main content

<Loading />

You're reading Identity & Access Management 7.2.0. The newest release is 7.3.0, and Cloud has the newest features. Go to the newest release

The Loading component of the WSO2 Identity Server Vue SDK (@asgardeo/vue) renders its content while the SDK is busy, for example while it initializes, completes a sign-in or loads the user's profile.

Overview​

Loading reads isLoading from the authentication context. While it is true, Loading renders its default slot. Otherwise, it renders the fallback slot, or nothing if you don't provide one.

Usage​

The following examples show how to use Loading.

Basic usage​

Loading example
<script setup>
import { Loading } from '@asgardeo/vue'
</script>

<template>
<Loading>
<p>Loading...</p>
</Loading>
</template>

With a fallback​

Use the fallback slot to show your content once the SDK is idle.

With fallback
<script setup>
import { Loading, SignedIn, SignedOut, SignInButton } from '@asgardeo/vue'
</script>

<template>
<Loading>
<p>Loading...</p>
<template #fallback>
<SignedIn>
<p>Welcome back!</p>
</SignedIn>
<SignedOut>
<SignInButton />
</SignedOut>
</template>
</Loading>
</template>

Props​

Loading has no props.

Slots​

SlotDescription
defaultContent to render while the SDK is busy.
fallbackContent to render when the SDK is not busy.

Was this page helpful?