This gym app sign up screen links a new account to an existing club membership: members enter the code from their key card, see which club it belongs to, pick a password with a live strength meter and land on a member pass. It is an HTML mobile template for mobile sites and PWAs, built with Bootstrap 5, Bootstrap Icons and Barlow in dark charcoal with lime, and it can be packaged with Capacitor. Use it as a fitness app registration screen or member signup form.
How it works
The root .gsu-app is a centred app column (max 430 px) with a compact top bar and no tab bar. The form .gsu-form holds the membership code, name, email, password and terms fields.
The code input .gsu-code formats typing on the fly (dt48210937 becomes DT-4821-0937) and checks the pattern AB-1234-5678. The prefix is looked up in CLUBS in script.js: a known one shows the .gsu-match chip with club and plan, an unknown one shows an error. The password updates .gsu-meter through data-gsu-score (0 to 4) and the .gsu-strength text; the eye button toggles visibility.
On submit each field is validated, messages fill the .gsu-error paragraphs and focus moves to the first problem. A valid form shows a spinner, then the [data-gsu-panel="done"] panel with a member pass card; "Member since" and the intro session time are computed from today without a year. "Where is it?" opens the offcanvas .gsu-sheet from the bottom with tips for finding the code.
Customization
--gsu-lime,--gsu-lime-darkand--gsu-on-limeon.gsu-app: the accent for the brand mark, buttons, focus rings and the matched code chip.--gsu-bg,--gsu-fieldand--gsu-lineon.gsu-app: the charcoal background, input fill and borders.--gsu-radiuson.gsu-app: corner radius of inputs and buttons (10 px).CLUBSinscript.js: your own club prefixes, names and plans.CODE_REinscript.jsand thepatternattribute on.gsu-code: change both for a different code format.score()inscript.js: the password rules behind the four meter segments.- The
setTimeoutin the submit handler: replace it with afetch()to your sign-up endpoint.
Use cases
- Gym and fitness club apps: members activate the app with the code from their card.
- Yoga, climbing and swim studios: link a front-desk membership to an online account.
- Corporate wellness portals: employees sign up with a company access code.
Accessibility
Inputs have visible labels, real type and autocomplete values (name, email, new-password) and are linked to help and error text with aria-describedby and aria-invalid. The password toggle uses aria-pressed. Status changes are announced in a polite aria-live region and the success heading receives focus. Touch targets are at least 44 px, and the bottom sheet closes with Escape, the close button or a tap on the backdrop.
Usage notes
Requires the Bootstrap 5.3 bundle for the offcanvas sheet. The code is prefilled for the demo; remove the value attribute on .gsu-code for an empty field.