StealThis .dev

Real Estate — Schedule Tour / Open House

An editorial schedule-a-tour widget for a property listing, pairing a brass-accented serif header with a polished booking panel. Visitors switch between in-person and video showings, scan a seven-day date strip, and select from available time-slot chips while booked times are disabled. Contact fields gate a live summary and confirm button, and a separate open-house list lets guests RSVP. Built with semantic markup, ARIA roles, and vanilla JavaScript — no frameworks or network required.

在 Lab 開啟
html css vanilla-js
目標: JS HTML

程式碼

Schedule Tour / Open House

A premium, editorial tour-booking widget for a single property listing. The left column presents the home — a gradient “listing photograph”, a brass status badge, price, specs (beds, baths, sq ft, lot), and the listing agent — while a sticky booking panel handles the appointment. A radio-style toggle switches between In-person and Video tours, a horizontal strip shows the next seven days, and a grid of time-slot chips lets buyers pick a time. Slots that are already taken render disabled and struck-through, so availability reads at a glance.

The flow is driven by a small amount of vanilla JavaScript. Selecting a tour type, date, and time keeps a live summary in sync; the Confirm tour request button only enables once a valid slot is chosen and name and email are filled in. Confirming fires a toast, then locks the chosen slot as if it were freshly booked. A dedicated open-house list sits below the listing card, where each event can be RSVP’d — toggling the button updates the attendee count and surfaces a confirmation toast.

Everything is self-contained: two Google Fonts, hand-tuned CSS gradients standing in for property photography, accessible role/aria-* attributes on the controls, AA-contrast colors, and a responsive layout that collapses to a single column and reflows the slot grid down to ~360px.

Illustrative UI only — sample listings and data are fictional; not a real real-estate service.