Auth — Signup
Anatomy
A composed application section with typed inputs and native HTML output.
maud_ui::blocks::auth::signup
Props
Generated from public Rust fields. Defaults are evaluated from the implementation.
| Prop | Type | Default | Description |
|---|---|---|---|
action | String | "/signup" | POST target for the email + password form. Submits fields: name, email, password, password_confirm, accept_terms. |
logo | Option<Markup> | None | Optional brand logo shown above the heading. |
heading | String | "Create your account" | Headline (default: "Create your account"). |
subheading | String | "Start in under a minute." | Subheading under the heading (default: "Start in under a minute."). |
error | Option<String> | None | Error banner (danger variant). Typical use: re-render the page with Some("Email already in use") after a failed POST. |
oauth_providers | Vec<crate::blocks::auth::login::OAuthProvider> | [] | OAuth providers shown above the email form. Same shape as auth::login::OAuthProvider — consumers often share a Vec between their login + signup pages. |
collect_name | bool | true | Include the full-name field at the top of the form. Many B2C flows skip this and collect the name later. Default: true. |
require_password_confirm | bool | true | Include the password-confirmation field. Default: true. |
terms_url | Option<String> | None | Terms of Service URL. If terms_url or privacy_url is set, a checkbox row appears above the submit button. |
privacy_url | Option<String> | None | Privacy Policy URL. Rendered next to the Terms link in the checkbox label. |
signin_url | Option<String> | None | URL for the "Already have an account? Sign in" link at the bottom of the card. None hides the prompt — useful for embedded signup where the parent page already has a sign-in option. |
submit_label | String | "Create account" | Submit button label (default: "Create account"). |
email_value | String | "" | Email value to preserve across error re-renders. |
name_value | String | "" | Name value to preserve across error re-renders. |
Examples
Create your account
14-day free trial. No credit card required.
Usage
use maud_ui::blocks::auth::signup;
signup::render(signup::Props {
action: "/auth/signup".into(),
heading: "Create your account".into(),
subheading: "14-day free trial. No credit card required.".into(),
terms_url: Some("/legal/terms".into()),
privacy_url: Some("/legal/privacy".into()),
signin_url: Some("/auth/login".into()),
// Re-render after failed POST to preserve input + surface error:
// email_value: submitted_email,
// name_value: submitted_name,
// error: Some("Email already in use".into()),
..Default::default()
})Accessibility
Supply meaningful labels, choose heading levels for the surrounding page, and preserve native link and form behavior. Keyboard focus follows document order. Motion honors reduced-motion preferences.