Componentform1.36 KB gzipZero dependencies
Register Form
Registration form with name, email, animated password strength and terms consent.
Preview
Live Preview
Installation
Tokens guide →Add to your project via CLI (zero dependencies, code you own):
npx bigbullui add register-formOr install the full npm package:
npm install bigbulluiUsage
tsx3 lines
import { RegisterForm } from "@/components/ui/register-form"; <RegisterForm />Source code
register-form.tsx + 1 helperZero third-party dependencies (2 local files shown in tabs below).
tsxregister-form.tsx120 lines
"use client"; import * as React from "react";import { cn } from "./lib/utils"; export interface RegisterFormProps extends Omit<React.HTMLAttributes<HTMLFormElement>, "onSubmit"> { onSubmit?: (data: { name: string; email: string; password: string }) => void; termsHref?: string;} /** Registration form: name/email/password + terms consent + live validation. */export function RegisterForm({ onSubmit, termsHref = "#", className, ...props }: RegisterFormProps) { const [name, setName] = React.useState(""); const [email, setEmail] = React.useState(""); const [password, setPassword] = React.useState(""); const [agreed, setAgreed] = React.useState(false); const [touched, setTouched] = React.useState<Record<string, boolean>>({}); Props
Interactive Prop Playground
Tweak parsed AST props below to generate ready-to-paste JSX.
tsx3 lines
import { RegisterForm } from "@/components/ui/register-form"; <RegisterForm />| Prop | Type | Description |
|---|---|---|
| onSubmit | (data: { name: string; email: string; password: string }) => void | Callback invoked on submit. |
| termsHref | string | Configures terms href. (Default: "#") |