LogoLogo
  • Welcome to OneAuxilia Docx
  • UI Component
    • Overview
    • <OneAuxiliaProvider>
    • Authentication Components
      • <SignIn />
      • <SignUp />
      • <GoogleOneTap />
    • User Components
      • <UserButton />
      • <UserProfile />
    • Organization Components
      • <CreateOrganization />
      • <OrganizationProfile />
      • <OrganizationSwitcher />
      • <OrganizationList />
    • Control Components
      • <AuthenticateWithRedirectCallback />
      • <OneAuxiliaLoaded>
      • <OneAuxiliaLoading>
      • <Protect>
      • <MultisessionAppSupport>
      • <RedirectToSignIn />
      • <RedirectToSignUp />
      • <RedirectToUserProfile />
      • <RedirectToOrganizationProfile />
      • <RedirectToCreateOrganization />
      • <SignedIn>
      • <SignedOut>
    • Unstyled Components
      • <SignInButton>
      • <SignInWithMetamaskButton>
      • <SignUpButton>
      • <SignOutButton>
  • Quick Start
  • Users
    • Overview
    • Metadata
    • Delete User
  • Organization
    • Organization, Role and Permission
      • Overview
      • Role and Permission
      • Guides
        • Create Role and assign Permission
        • Verify the active user's permission
        • Reassign the Creator role
      • Building custom flow
    • Multi Tenant Setting
  • Application
    • Application
    • User Portal
  • Authentication
    • Setting
    • Social Connectors
    • Multi Factor
  • Customize
    • Branding
    • Sign Up vs Sign In
      • Overview
      • Configuration
        • Sign-up and Sign-in options
        • Session Option
        • Email and SMS templates
      • Social Connection
        • Overview
        • Social connections (OAuth)
        • Account Linking
        • Setup Social Account Linking
  • Development
    • API Key
    • Local Path
    • Custom JWT templates
    • Domain
    • Webhook
    • Backend Request
      • Overview
      • Making requests
        • Same-origin requests
        • Cross-origin requests
        • Customize your session token
      • Handling requests
        • Manual JWT verification
      • Session Management
  • SDK References
    • React
      • Overview
      • Guides
        • Add React Router
      • Client-side Helpers
        • useUser()
        • useOneAuxilia()
        • useAuth()
        • useSignIn()
        • useSignUp()
        • useSession()
        • useSessionList()
        • useOrganization()
        • useOrganizationList()
  • API References
    • Open API
  • industry reference
    • Ecommerce
    • Broadcasting
    • IoT
Powered by GitBook
On this page
  • Properties
  • Usage
  • Basic usage
  • Custom usage
  1. UI Component
  2. Unstyled Components

<SignUpButton>

The <SignUpButton> component is a button that links to the sign-up page or displays the sign-up modal.

Properties


asChild? boolean

For Astro only: If true, the <SignUpButton> component will render its children as a child of the component.


forceRedirectUrl? string

If provided, this URL will always be redirected to after the user signs up. It's recommended to use the environment variable instead.


fallbackRedirectUrl? string

The fallback URL to redirect to after the user signs up, if there's no redirect_url in the path already. Defaults to /. It's recommended to use the environment variable instead.


signInForceRedirectUrl? string

If provided, this URL will always be redirected to after the user signs in. It's recommended to use the environment variable instead.


signInFallbackRedirectUrl? string

The fallback URL to redirect to after the user signs in, if there's no redirect_url in the path already. Defaults to /. It's recommended to use the environment variable instead.


mode? 'redirect' | 'modal'

Determines what happens when a user clicks on the <SignUpButton>. Setting this to 'redirect' will redirect the user to the sign-up route. Setting this to 'modal' will open a modal on the current route. Defaults to 'redirect'


children? React.ReactNode

Children you want to wrap the <SignUpButton> in.


initialValues SignUpInitialValues

The values used to prefill the sign-up fields with.

Usage

Basic usage

pages/index.js
import { SignUpButton } from '@oneauxilia/nextjs'

export default function Home() {
  return <SignUpButton />
}
example.js
import { SignUpButton } from '@oneauxilia/oneauxilia-react'

export default function Example() {
  return <SignUpButton />
}
pages/index.js
import { SignUpButton } from '@oneauxilia/remix'

export default function Home() {
  return <SignUpButton />
}
pages/index.astro
---
import { SignUpButton } from '@oneauxilia/astro/components'
---

<SignUpButton />

Custom usage

You can create a custom button by wrapping your own button, or button text, in the <SignUpButton> component.

pages/index.js
import { SignUpButton } from '@oneauxilia/nextjs'

export default function Home() {
  return (
    <SignUpButton>
      <button>My custom button</button>
    </SignUpButton>
  )
}
example.js
import { SignUpButton } from '@oneauxilia/oneauxilia-react'

export default function Example() {
  return (
    <SignUpButton>
      <button>My custom button</button>
    </SignUpButton>
  )
}
pages/index.js
import { SignUpButton } from '@oneauxilia/remix'

export default function Home() {
  return (
    <SignUpButton>
      <button>My custom button</button>
    </SignUpButton>
  )
}

You must pass the asChild prop to the <SignUpButton> component if you are passing children to it.

pages/index.astro
---
import { SignUpButton } from '@oneauxilia/astro/components'
---

<SignUpButton asChild>
  <button>My custom button</button>
</SignUpButton>
Previous<SignInWithMetamaskButton>Next<SignOutButton>

Last updated 6 months ago