NuxtLegoNuxtLego

Auth UI

Primitive Auth UI with Social Providers and Native Form.

NuxtLego

Create your account

to continue to NuxtLego

Have an account? Sign In
Available Providers
  • Facebook
  • Twitter
  • Google
  • Discord
  • GitHub
  • GitLab
  • Apple
  • Slack
  • Azure
  • Bitbucket
  • Tiktok
  • LinkedIn

Custom Button (for Providers)

Let's say if you are using a UI Library, you would want to replace the native button element with the library's button. In (> 0.0.13), you can pass in a is prop.

Example below, we wrap a custom button named CustomButton, and pass it as is prop. So now instead of rendering native button, it will be rendering whatever component you passed in.

Custom Button
for Social Providers

Anatomy

<template>
  <LegoAuth
    :hide-provider-label="true"
    :providers="['twitter', 'google', 'facebook']"
  >
    <LegoAuthHeader />

    <LegoAuthSocialProviders @select="handleSelectProvider" />

    <LegoAuthForm @submit="handleSubmit">
      <LegoAuthFormInputText />

      <LegoAuthFormButton />
    </LegoAuthForm>
  </LegoAuth>
</template>

API Reference

Root

Wrapper that provide the information required for the child component.

PropDefaultTypesDescription
providers-Provider[]List the social providers you need
hideProviderLabel-booleanHide the label for social provider button

Providers

PropDefaultTypesDescription
is-ComponentReplace native button with your desired custom component

Event

NameComponentPayloadDescription
@selectLegoAuthSocialProvidersProviderEvent triggered when selecting social provider
@submitLegoAuthForm{ [key]: any }Event triggered when click on