A cinema seat selection screen built with pure CSS and vanilla JavaScript: date and showtime chips, a curved screen indicator, a seat map with available, selected, taken and recliner seats, and a sticky price bar. It is an HTML mobile template for mobile sites and PWAs and can be packaged as a native app with Capacitor. Use it as the seat picker of a movie ticket booking app, a theater seat map or any seat reservation UI.
How it works
The root .cs-app is a phone-width column (max 430px, centred on wide screens) with a sticky .cs-bar at the bottom.
The .cs-date chips are filled by dayFor() relative to today, so dates never go stale. Dates and .cs-time chips are radio groups; picking another one rebuilds the map.
buildMap() draws rows ROWS (A to H) with SEATS_PER_ROW seats as .cs-seat buttons inside .cs-map. Taken seats come from a seeded generator, so every showtime has its own stable pattern. Rows in RECLINER_ROWS get .cs-seat--vip and their own price. A tap toggles aria-pressed and updateBar() refreshes the seat list, total and ticket count.
Continue opens dialog.cs-sheet, a native <dialog> bottom sheet where Adult, Child and Senior steppers must add up to the number of seats. Each .cs-type has a data-cs-discount. An incomplete assignment shows an error; otherwise a success panel with a booking code appears and the booked seats become taken.
Customization
--cs-gold,--cs-gold-strongand--cs-gold-softon.cs-app: the accent of selected chips and seats, recliner outlines, the screen glow and the buttons.--cs-bg,--cs-surfaceand--cs-seat-free: the charcoal background, card and free seat colours.ROWS,SEATS_PER_ROWandAISLES_AFTERinscript.js: the hall size and where the aisles are.PRICESandRECLINER_ROWSinscript.js: seat prices and which rows are premium.data-cs-maxanddata-cs-feeon.cs-app: the maximum seats per booking (8) and the fee per ticket (0.75).data-cs-fillon a.cs-timechip: how sold out that showtime looks; replace the generator with seat data from your API.- The Pay handler: add
fetch()where the comment says to reserve the seats and start payment.
Use cases
- Cinema chains and independent movie theaters: let guests pick seats after choosing a showtime.
- Theater and concert ticketing: rows, aisles and premium seating with different prices.
- Lecture and conference apps: reserve a seat for a session.
Accessibility
Seats are buttons labelled like "Row E, seat 5, $11.50"; taken seats are disabled and striped, not only coloured. The map uses a roving tabindex: one Tab stop, arrow keys move between free seats, Home and End jump within a row, Enter or Space selects. Totals are announced through live regions. The sheet is a modal dialog: Escape or a tap on the backdrop closes it and focus returns to the screen. Animations stop with prefers-reduced-motion.
Usage notes
Movie, cinema and prices are sample data; the screen arc is inline SVG.