Skip to content

Upcoming Events Calendar with Photos

Dark Tailwind CSS agenda of upcoming events with date blocks, event photos, category filters and RSVP toggle buttons with live spot counts.

Also known as: events agenda list, upcoming events calendar, event listing with rsvp, event schedule section, community events list

Tailwind CSS Calendars Responsive Dark #agenda #calendar #dark #events #photos #responsive

Upcoming Events Calendar with Photos live demo

Open in new tab

Tailwind CSS code (HTML, CSS, JS)

An agenda-style events calendar built with Tailwind CSS and a little vanilla JavaScript. Each upcoming event gets a bold date block, a photo, a category label, time and venue, plus a "Save my spot" button, which makes it a good fit for venue websites, community calendars, conference pages and city guides.

How it works

The root is section.tec-events on a dark bg-zinc-950 background. The agenda is an ordered list (ol[data-tec-list]) because the events are in date order. Every li carries a data-tec-category value and wraps an article.tec-event, a CSS grid with four columns on larger screens: the amber date block, the photo, the details and the RSVP area. The date block is a time element with a machine-readable datetime attribute. On load the script places each time[data-tec-offset] that many days after today, fills its data-tec-month, data-tec-day and data-tec-weekday spans and the datetime, and writes the month range into data-tec-period, so the demo never looks outdated. On phones the grid collapses to two columns and the photo moves above the details at 16:9 (order-first col-span-2).

The filter buttons (data-tec-filter) are toggle buttons with aria-pressed. Clicking one hides the rows from other categories with the hidden attribute, replays a short fade-in on the rows that come back (tec-is-entering) and shows the data-tec-empty message when nothing matches. The pressed style comes from Tailwind's aria-pressed: variant, so the visual state always matches the ARIA state.

Each data-tec-rsvp button toggles aria-pressed, swaps its text between "Save my spot" and "You're going", shows a check icon (.tec-check) and moves the data-tec-spots counter down or up by one. Add a fetch() call where the script comment says to store RSVPs on your server.

Customization

  • data-tec-category on each li and data-tec-filter on the buttons: add your own categories; the values just have to match.
  • Real events: remove data-tec-offset and write the date into the time element; the script then leaves it alone.
  • bg-amber-400 on the time blocks and the amber utilities on .tec-rsvp: change the accent color of the dates and buttons.
  • sm:grid-cols-[4.75rem_9.5rem_1fr_auto] on .tec-event: widen the second value to show larger photos on desktop.
  • The category pills (bg-sky-400/15 text-sky-300 and similar): give each category its own color.
  • max-w-4xl on the inner container: use max-w-5xl for a wider agenda.

Use cases

  • Venue websites: list upcoming shows with date blocks, photos, times and locations
  • Community calendars: visitors filter events by category and save their spot
  • Conference pages: an agenda in date order shows each session with its venue
  • City guides: RSVP buttons update the remaining spots counter live
  • Dark-themed sites: amber date blocks stand out against a zinc background

Accessibility

The section is labeled by its heading, the agenda is a labeled ol, and each article is labeled by its event title. The filter group has an aria-label, and all filter and RSVP buttons expose their state through aria-pressed. Each RSVP button is described by its event title, so screen reader users know which event they are saving. Filter results and RSVP changes are announced in a visually hidden aria-live region. Photos have descriptive alt text, all controls show an amber focus ring, and the fade-in is turned off under prefers-reduced-motion.

Usage notes

For several calendars on one page, give the tec-ev*-title headings unique id values and update the matching aria-labelledby and aria-describedby attributes.

Upcoming Events Calendar with Photos at a glance

Framework
Tailwind CSS
Code
HTML, CSS, JavaScript
JavaScript
Vanilla JavaScript, no jQuery
Dependencies
Tailwind CSS
Layout
Responsive, works on mobile, dark design
Category
Calendars
License
Free for personal and commercial use

Questions about this template

Can I use the Upcoming Events Calendar with Photos code for free?

Yes. You can copy or download the code and use it in personal and commercial projects, including client work. No sign-up is needed. Reselling it as part of a component library or template collection is not allowed; see the license.

How do I add it to my website?

Load Tailwind CSS from a CDN (the links are under Requirements). Paste the HTML where the component should appear, add the CSS to your stylesheet and load the JavaScript before the closing </body> tag. Download HTML gives you a complete page with everything already linked.

Does it need jQuery or a JavaScript framework?

No. The script is plain vanilla JavaScript, so it works without jQuery, React or Vue. You can still use the markup inside those frameworks.

Does it work on mobile?

Yes. The layout adapts to small screens. Use the Mobile and Tablet buttons above the live demo to check it at phone and tablet width.

Requirements

Add these to your page (already included in the download):

  • <script src="https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4"></script>

The Tailwind browser build is for prototyping. In production, compile Tailwind with its CLI or your bundler.

Upcoming Events Calendar with Photos – Tailwind CSS calendars component screenshot
Upcoming Events Calendar with Photos · Tailwind CSS Calendars

More Calendars

Mini Calendar – Pure CSS calendars preview

Mini Calendar

Compact month calendar generated with vanilla JS and styled with pure CSS: selectable days, today marker, month navigation and full arrow-key support.

Month Calendar with Events – Tailwind CSS calendars preview

Month Calendar with Events

Tailwind CSS month calendar with colored event pills, today highlight, prev/next navigation, keyboard support and a day agenda.