A ride app phone number login screen with a country code picker in a bottom sheet, live number formatting, a terms checkbox and an SMS code step. This HTML mobile template for mobile sites and PWAs is built with Bootstrap 5, Bootstrap Icons and flag-icons, works as a mobile number input with country code for taxi, delivery or any passwordless sign-in, and can be packaged with Capacitor.
How it works
The root .rdl-app is a centred app column with a dark header (an inline SVG street map with a lime route) and a white .rdl-sheet that holds three steps: phone, code and done ([data-rdl-step]).
The .rdl-country button opens #rdl-countries, a Bootstrap offcanvas styled as a bottom sheet. Its list is rendered from the COUNTRIES array in script.js; the search field filters by country name or dial code and shows an empty state when nothing matches. Picking a country updates the flag, the dial code, the placeholder and the number format. The sheet closes with the X button, Escape or a tap on the backdrop.
The type="tel" input is reformatted on every keystroke with the selected country's mask and limited to its length. Continue checks the number length and the terms checkbox, shows inline errors, then simulates sending a code. The code step has four one-digit inputs with auto advance, Backspace, arrow keys and paste; a full code is checked automatically. A resend timer counts down from data-rdl-seconds. Help, email sign-in and the pickup button show a Bootstrap toast.
Customization
--rdl-limeinstyle.css(on.rdl-app): the accent of the buttons, route line, logo dot and success badge.--rdl-radiuson.rdl-app: the 14 px radius of the phone field, code cells and buttons.COUNTRIESinscript.js: add rows as code, name, dial code, mask (#= digit) and example number.data-rdl-codeon.rdl-app: the demo code (4826); remove.rdl-demoand check the code on your server.data-rdl-secondson.rdl-app: the resend wait time in seconds.- Replace the timeout in the phone form submit handler with
fetch()to your SMS endpoint. - Edit
.rdl-mappaths to change the street pattern in the header.
Use cases
- Ride-hailing and taxi apps: sign in with a mobile number before booking a trip.
- Food and grocery delivery apps: verify the number couriers will call.
- Scooter and bike sharing PWAs: quick passwordless login at the vehicle.
- Marketplaces and booking apps: phone-first sign-up for international users.
Accessibility
The country button has a descriptive aria-label that names the current country. The bottom sheet uses Bootstrap's offcanvas focus handling and returns focus to the button when it closes; options are buttons with aria-pressed, and the number of search results is announced. Errors are linked with aria-describedby, set aria-invalid and live in polite regions. Code cells use inputmode="numeric" and autocomplete="one-time-code". All targets are at least 44 px, focus outlines are visible and transitions stop with prefers-reduced-motion.