A traveler profile screen in plain CSS and vanilla JavaScript, with trip stats, a visited countries list with flags drawn as CSS colour blocks, a trip timeline and an edit profile button. Sand tones, a terracotta accent and Work Sans make this travel app profile UI feel warm and personal. It is an HTML mobile template for mobile sites and PWAs, and it can be packaged as a native app with Capacitor.
How it works
The root .tvp-app is a 430 px app column on a neutral page. Under the sticky .tvp-top bar, .tvp-hero shows the avatar, name, home base and bio. The .tvp-stats card uses a <dl> for countries, trips and photos, followed by a role="progressbar" showing the share of the world visited.
The .tvp-list holds one .tvp-country per country. Each row is a button with aria-expanded that reveals the last visit date and a favourite memory. Flags are .tvp-flag elements with modifiers such as .tvp-flag--it or .tvp-flag--gh, built from gradients (Ghana's star uses clip-path). The .tvp-chips buttons filter rows by their data-region value and update [data-tvp-count].
The .tvp-trips timeline lists trips with data-start (days from today) and data-nights. The script turns them into date ranges without a year and adds an "In N days" pill to the upcoming trip, so the dates never go stale. Edit opens the .tvp-sheet bottom sheet with name, home base and bio fields, validates them, simulates a save and updates the profile.
The portrait comes from Unsplash; replace it with the user's own photo.
Customization
--tvp-accenton.tvp-app: terracotta colour of chips, buttons, the timeline dot and the active tab.--tvp-sandand--tvp-card: page and card backgrounds.--tvp-radius: the 14 px radius of cards, chips and buttons.- Add a flag with a new
.tvp-flag--xxrule using alinear-gradientof the flag colours. data-regionon.tvp-countryand a matchingdata-tvp-regionchip: add regions such as Oceania.data-days-agoon each country anddata-start/data-nightson each trip: control the computed dates.- Replace the
setTimeoutin the form submit handler withfetch()to save to your API.
Use cases
- Travel journal and trip planner apps: a personal profile with country count and history.
- Travel communities and social apps: public traveler profiles with stats and recent trips.
- Booking and tour operator PWAs: a member area showing past and upcoming trips.
- Photo sharing apps: link trips and photo counts to a profile.
Accessibility
Region chips use aria-pressed, country rows use aria-expanded with aria-controls, and the tab bar marks the current page with aria-current. The edit sheet is a role="dialog" with aria-modal, keeps Tab focus inside, closes with Escape, the close button or a backdrop tap, and returns focus. Fields use real autocomplete values; errors set aria-invalid and are linked with aria-describedby. A polite role="status" region announces filters and saves. Touch targets are at least 44 px, and the sheet animation stops for prefers-reduced-motion.