Skip to content

Limited offer with remaining seats

A promotional card for a course, a workshop or an opening: remaining seats, a fill bar, the registration deadline and a booking button, with no countdown timer.

  • Tailwind
  • React
  • CSS
  • WordPress
Open in a new tab

Description

To fill a course, a workshop or an opening night without artificial pressure, this card simply says how many seats are left and until when people can register. It shows the session title, a short text, four practical details (dates, times, price, venue), the “3 seats left out of 12” counter with a fill bar and the deadline written out in full. The counter is static: nothing counts down on the page, you set three attributes on the section (data-olp-total, data-olp-left, data-olp-end) and the script works out the state: “Seats available”, “Last seats” when a quarter or fewer remain, “Full” (the button becomes “Join the waiting list”) or “Registration closed” once the date has passed (“Get notified of the next session”). Without a date, the line reads “until all seats are taken”. A MutationObserver updates everything if your site changes an attribute after a booking, and an olp:change event passes on the total, the remaining seats and the state. Accessibility: the bar uses role="progressbar" with a readable value (“9 seats booked out of 12”), changes are announced by a role="status" region, the state is written out rather than conveyed by colour alone, 48 px buttons with a visible focus. Date formatted the French way in the Europe/Paris time zone with Intl.DateTimeFormat, bar transition removed with prefers-reduced-motion, AA contrast in light and dark mode, no horizontal scrolling from 360 px, no dependency. Example: a wheel-throwing course in a ceramics studio. The texts of the example are in French.

Code

Loading the code…

The code of this component in

Archive contents

cta-offre-limitee-compteur-places-html-tailwind.zip3 files · 7 Ko

  • index.html11 Ko
  • README.md5 Ko
  • LICENSE.md1 Ko

Tags

Updated on December 2, 2026.

Reviews

No reviews yet.

In the same spirit

  • A Free quote within 24 hours banner with a request button, a clickable phone number and three guarantees (no commitment, fast reply, free visit), with no JavaScript.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component
  • A desktop contact card with a clickable tel: number, a live Available badge and response hours, for tradespeople who want to be phoned directly.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component
  • A call to action for a limited offer: serif heading, two links and a countdown in days, hours and minutes inside a coupon-style frame.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component
  • A direct-call block for emergencies, with the number in very large type and response times.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component