Staaarter

Events Calendar

Event listing with date badges, images, time/capacity info, pricing, and RSVP buttons. Perfect for wine tastings, themed dinners, and special occasions.

By Staaarter Team
Food
Docs
Live preview

Docs

Installation

A real shadcn registry command, not a copy-paste stand-in: it fetches this block plus its button, media-slot dependencies and any missing npm packages, and installs them straight into your project.

npx shadcn add https://staaarter.com/r/events-calendar.json

Prefer not to use the CLI? Copy the source from the Code toggle above into src/components/blocks/food/food22.tsx instead.

Usage

The file also exports food22Demo, the exact props behind the preview above. Spread it to get a working section in one line, then replace it with your own data.

import { Food22, food22Demo } from "@/components/blocks/food/food22";

export default function Page() {
  return <Food22 {...food22Demo} />;
}

Props

PropTypeDefaultDescription
headingstringnoneSection heading.
descriptionstringnoneSection intro text below the heading.
eventsFoodEventItem[]noneEvent rows, each with a date badge, image, time/capacity, price, and RSVP button.
classNamestringnoneExtra classes for the outer section element.

Types

type FoodEventItem = {
  title: string;
  description?: string;
  image?: { src: string; alt: string };
  month: string;
  day: string;
  time: string;
  capacity?: string;
  price: string;
  ctaLabel?: string;
};

Behavior notes

  • The heading/description block only renders when at least one of the two is set.
  • The date badge overlaid on each event's image is built from separate month/day strings rather than a real Date object, since these blocks render statically and must not compute dates at render time.
  • capacity only renders when set; an event without it simply omits that meta item.
  • Every RSVP button is decorative and inert (no click handler): there is no real booking backend wired up. ctaLabel defaults to "RSVP" per event when not supplied.
  • Each event row stacks (image above content) on mobile and switches to a horizontal row from the sm breakpoint up.