AuthModalContent

Sign-in / register panel — username + password fields, error alert, submit/cancel, optional switch link; busy overlay via SetBusy.
Package
SusGame · Screens (commercial)
SusGame · Screens
Props
| Name | Type | Default | |
|---|---|---|---|
TitleText | Prop<string> | "" | |
SubmitLabel | Prop<string> | "Sign in" | |
ErrorText | Prop<string> | "" | |
SwitchLabel | Prop<string> | "" |
Slots
No slots.
Events
No public events.
Style hooks
USS class contract — override appearance without touching C#. States toggle via these classes:
auth-modal-contentauth-modal-content__panelsus-flow-actions-rowsus-flow-btn--mr12sus-flow-link--footer
Usage
Wire host clicks on public buttons / link after mount. Bind labels and error text with Prop<>.
xml
<template>
<sus:AuthModalContent
:TitleText="Title.Value"
:SubmitLabel="Submit.Value"
:ErrorText="Error.Value"
:SwitchLabel="Switch.Value"
/>
</template>
<script>
public Prop<string> Title = new("Sign in");
public Prop<string> Submit = new("Sign in");
public Prop<string> Error = new("");
public Prop<string> Switch = new("Create account");
</script>csharp
var auth = new AuthModalContent();
auth.TitleText.Value = "Sign in";
auth.SubmitLabel.Value = "Sign in";
auth.SwitchLabel.Value = "Create account";
auth.ErrorText.Value = ""; // non-empty shows SusAlert
// After mount:
auth.SubmitBtn.OnClick += () => { /* login */ };
auth.CancelBtn.OnClick += () => { /* dismiss */ };
auth.SwitchLink.OnClick += () => { /* flip mode */ };
auth.SetBusy(true, "Signing in…"); // overlay + disables fields
auth.SetBusy(false);| Prop / API | Role |
|---|---|
TitleText | Heading (SusBanner) |
SubmitLabel | Primary button label |
ErrorText | Error alert text; empty → hidden |
SwitchLabel | Footer link text |
UsernameField / PasswordField | Built SusTextfield hosts |
SubmitBtn / CancelBtn / SwitchLink | Wire host actions |
SetBusy(busy, message?) | SusServerBusyOverlay + disable controls |
Notes
- Built lazily in
Created/EnsureBuilt— fields are null until then. - Password field is created with
password: true. - Prefer host screens/modals that own navigation; this is content only (no route logic).