Signup Form, animated React component
A signup card with floating labels that spring up as you type, password rules that tick green as they are met, and inline errors that shake the field that needs fixing. Submitting squeezes the button into a spinner and swells it back out in green; a matching LoginForm ships alongside it.
- Free
- Signup Forms
- Spring
Taps when you press submit, chimes on success and bumps on an error, with a very quiet tick when a password rule turns green. Sound is off on this site until you switch it on.
Types with a key click for every character, in sync with the text. The click stays off until you switch it on.
Signup Form
Login Form
Like Signup Form? 256 more are in Pro.
Pro unlocks all 256 Pro components, every template and block, and everything we release next. Signup Form stays free.
Play with it
Move the controls and watch it change. Copy code gives you a snippet with only the props you changed.
Props
| Prop | Type | Default | What it does |
|---|---|---|---|
| title | string | "Create your account" | Heading. |
| subtitle | string | "Start building polished interfaces with motion-first components." | Line under the heading; empty string hides it. |
| submitLabel | string | "Create account" | Button label when idle. |
| loadingLabel | string | "Creating account..." | Accessible label while the button is a spinner. |
| successLabel | string | "Account created" | Button label after success. |
| showNameField | boolean | true | Show first and last name. |
| showConfirmPasswordField | boolean | true | Show the confirm-password field. |
| minPasswordLength | number | 8 | Minimum password length (at least 6). |
| defaultValues | Partial<SignupFormValues> | — | Initial values. |
| onSubmit | (values: SignupFormValues) => Promise<void> | void | — | Called after validation. A promise shows the spinner; throw an Error to show its message. Without it the form simulates success. |
| showSocialLogins | boolean | true | Show the GitHub, Apple and Google buttons. |
| onSocialLogin | (provider: "github" | "apple" | "google") => void | — | Called by a social button. |
| onSignIn | () => void | — | Shows an Already have an account? link when set. |
| autoplay | boolean | false | Types a demo signup on a loop until someone touches the form. |
| className | string | — | Extra classes on the card. |
| enableSound | boolean | true | Plays interface sounds on interaction. They follow the sound switch (setSoundsEnabled, on by default) and stay silent on hover. Autoplay makes the same sounds once the visitor has used the page. Pass false to silence this component. |
Add it to your project
- 1
Set up your project once
You need a Next.js project with Tailwind CSS and the
@/import alias. In its root folder, run this once. It createscomponents.jsonand thecn()helper insrc/lib/utils.ts:npx shadcn@latest init -d
Starting from nothing? The Quick Start walks through the whole thing.
- 2
Connect the registry
Run this once per project. It writes the Nexus UI entry into
components.jsonfor you:npx shadcn@latest registry add "@nexus-labs=https://www.nexus-ui.com/api/registry/{name}"Type it exactly as shown.
{name}is filled in by the CLI with the component you ask for, so you never replace it.
- 3
Add the component
Run this from your project root. It adds the component, the helpers it imports and its npm packages.
npx shadcn@latest add @nexus-labs/signup-form
- 4
Check what was added
With a project made as in the Quick Start (a
src/folder), these files land in it:components/signup-form.tsxsignup-form/brand-icons.tsxform-parts.tsxindex.tslogin-form.tsxsignup-form.tsx - 5
Copying by hand? Skip the registry
Instead of steps 2 and 3 you can copy the files yourself, with no registry and no API key. Step 1 still applies, so that
cn()exists. Install the packages:npm install framer-motion
Then show the source and create each file at the path it gives:
- 6
Use it in a page
Installing only adds the files. Import the component in a page and render it. The Usage tab on the preview shows a fuller example with props:
// src/app/page.tsx import { SignupForm, type SignupFormValues } from "@/components/signup-form"; export default function Page() { return ( <main> <SignupForm /> </main> ); }
Like Signup Form? 256 more are in Pro.
Pro unlocks all 256 Pro components, every template and block, and everything we release next. Signup Form stays free.
About Signup Form
The Signup Form is an animated registration form with field-level validation feedback and Framer Motion spring transitions on focus and error states. Validation messages enter and exit with layout animations that keep the form height stable. Built for Next.js App Router with server action support, it accepts email, password, and any additional field configuration. A clean, conversion-optimized starting point for any product registration flow.
Good for
- Product account creation forms
- Newsletter and waitlist signups
- Event registration forms
- Beta access request pages
Signup Form questions
How do I install the signup form?
Run `npx shadcn@latest add @nexus-labs/signup-form`. It pulls in the shadcn/ui input, label and button components plus framer-motion and lucide-react.
What does the form validate?
First and last name need at least 2 characters, the email must look like an address, the password must meet `minPasswordLength` (default 8, never below 6), and the confirm field must match. The first failing rule is shown as an error message under the form.
How do I connect it to my auth backend?
Pass an `onSubmit` handler; it receives the values after validation passes. While its promise is pending the button shows `loadingLabel`, on success it shows `successLabel`, and if it throws the form shows an error. The GitHub, Apple and Google buttons call `onSocialLogin(provider)`, and `showSocialLogins={false}` hides them.
Does it support dark mode and reduced motion?
Yes. It uses Tailwind `dark:` variants, and with prefers-reduced-motion on, the entrance and button-label transitions are reduced to simple fades.
Does it make sound, and how do I turn it off?
Taps when you press submit, chimes on success and bumps on an error, with a very quiet tick when a password rule turns green. Sounds are synthesised with the Web Audio API, so there are no audio files, and they only play after a click or key press. Pass `enableSound={false}` to silence this component, or call `setSoundsEnabled(false)` from `@/lib/ui-sounds` to switch every sound off at once. The CLI installs `@/lib/ui-sounds` with the component.