Skip to main content

<SignUpButton />

The SignUpButton component renders a button that takes the user to self-registration using the WSO2 Identity Server Vue SDK (@asgardeo/vue).

Overview​

When clicked, SignUpButton opens the WSO2 Identity Server sign-up page of your application. If you set signUpUrl on <AsgardeoProvider>, it navigates to that URL instead, for example a page of your app that renders the <SignUp> component.

note

Self-registration must be enabled in your WSO2 Identity Server organization for users to sign up.

Usage​

The following examples show how to use SignUpButton.

Basic usage​

SignUpButton example
<script setup>
import { SignedOut, SignUpButton } from '@asgardeo/vue'
</script>

<template>
<SignedOut>
<SignUpButton />
</SignedOut>
</template>

Without slot content, the button shows the elements.buttons.signup.text translation of the current language ("Sign Up" in English).

Custom content​

Put your own content in the default slot. The slot receives isLoading.

Custom content
<template>
<SignUpButton v-slot="{ isLoading }">
{{ isLoading ? 'Please wait...' : 'Create an account' }}
</SignUpButton>
</template>

Props​

SignUpButton has no props.

Slots​

SlotSlot propsDescription
default{ isLoading: boolean }Content of the button. Defaults to the elements.buttons.signup.text translation.

Events​

EventPayloadDescription
clickMouseEventEmitted when the button is clicked, before the sign-up action starts.
errorunknownEmitted when the action fails.

Styling​

The button has the CSS class asgardeo-sign-up-button. Add your own classes with the class attribute.

Was this page helpful?