Skip to content

Event card in React

A date block, the event title, place, time and a registration link.

Here is an excerpt of this component's code in React. The full code is free for members, ready to copy into your project.

This component also comes in

Open in a new tab

The code in React

EventCards.tsx
export function EventCards() {
  return (
    <div className="mx-auto w-[min(100%_-_2rem,64rem)] py-8">
      <ul className="grid grid-cols-[repeat(auto-fit,minmax(min(100%,17rem),1fr))] gap-5">
        <li className="grid grid-cols-[auto_1fr] gap-4 rounded-2xl border border-teal-100 bg-white p-4.5 dark:border-[#1d3f3b] dark:bg-[#0b1f1d]">
          <time
            dateTime="2026-11-15"
            className="grid h-19 w-17 place-content-center rounded-xl bg-teal-800 text-center font-semibold text-white dark:bg-teal-300 dark:text-teal-950"
          >
            <span className="text-3xl leading-none font-extrabold">15</span>nov.
          </time>
          <div className="grid gap-1.5">

Free component: copy it freely, including for commercial projects.

Cards components in React
  • A single-plan pricing card: struck-through price and discount, a places-left gauge driven by a data attribute, the list of everything included and a booking button that turns into a waiting list once sold out.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component
  • Three treatment cards in accessible neumorphism: gently raised surfaces, buttons that sink in when activated, a light/dark switch for the block itself. 3:1 outlines and AA text kept.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component
  • Four fully clickable workshop cards in a neo-brutalist style: thick border, solid offset shadow and a card that sinks onto its shadow on hover or focus. Pastel tones, dark mode, no JavaScript.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component
  • Three brutalist service cards: one-pixel border, hard offset shadow that lifts on hover and sinks on click, large type, accent and dark variants. No JavaScript.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component
  • A mobile page to link from your social profiles: portrait, name, priority links (booking, WhatsApp, website, reviews, call), opening hours with an open or closed status, social links and a share button, in dependency-free HTML and CSS.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component
  • A seasonal promotion card with a struck-through price and discount that announces by itself whether the offer is coming, how many days are left or that it is over.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component