A dating app sign up screen built with Tailwind CSS: step two of a profile onboarding flow with a first name field, a birthday with a live age check, a six-slot photo upload grid with instant previews and a progress bar. It is an HTML mobile template for mobile websites and PWAs and can be packaged as a native app with Capacitor. Use it as the profile creation UI of a dating, friendship or social discovery app.
How it works
The root .dsu-app is a phone-width column with a sticky top app bar (back button, step label, help button and the [data-dsu-progress] bar), a scrolling form and a sticky .dsu-actions bar with the Continue button.
The birthday uses three numeric fields marked data-dsu-bday (month, day, year) with bday-month, bday-day and bday-year autocomplete. Typing a full part moves focus to the next field and Backspace in an empty field moves back. ageFrom() in script.js rejects impossible or future dates and calculates the age from today, so the message under the fields says "You're 27" or explains that members must be MIN_AGE or older.
The photo grid .dsu-grid has six [data-dsu-slot] items; the first, .dsu-slot--main, spans two rows and carries the Main badge. Each empty slot is a label around a hidden type="file" input. When a file is chosen, the script creates a preview with URL.createObjectURL(), adds it to the photos array and renderPhotos() redraws the grid. Remove buttons ([data-dsu-remove]) take a photo out and the remaining photos move up, so the main slot is never empty while photos exist.
On submit the script validates the name, birthday and photo count (MIN_PHOTOS), shows inline messages and focuses the first problem. A valid form runs a short simulated save, shows the success panel and moves the progress to step 3. The help button opens #dsu-help, a native <dialog> styled as a bottom sheet with photo tips.
Customization
--dsu-accent,--dsu-accent-darkand--dsu-accent-softon.dsu-appinstyle.css: the rose brand colour of buttons, focus rings, progress and empty photo slots.--dsu-radiusinstyle.css: corner radius of the photo tiles (20px by default).MIN_AGEinscript.js: the minimum age required to join.MIN_PHOTOSinscript.js: how many photos are needed before Continue works; also update the hint text under Photos.TOTAL_STEPSinscript.js: the number of onboarding steps shown in the label and progress bar.grid-auto-rowsin.dsu-grid: the height of each photo row.- Replace the
setTimeoutin the submit handler withfetch()andFormDatato upload the files to your API.
Use cases
- Dating apps: the profile step after phone or email verification.
- Friendship and community apps: name, age and photos for a new member profile.
- Event and social discovery PWAs: quick profile setup with an age gate.
- Creator or marketplace apps that need a profile photo before going live.
Accessibility
Every field has a label, the birthday is a fieldset with a legend, and messages are linked with aria-describedby and aria-invalid. Add tiles are real file inputs with "Add photo 2" style labels and a visible focus ring; remove buttons have their own labels and are 44 px touch targets. Photo changes, step changes and errors are announced through a polite live region. The bottom sheet closes with Escape, the backdrop or the Got it button and returns focus to the help button. The sample portrait comes from Unsplash; replace it with your own image.