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.jsonPrefer 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
| Prop | Type | Default | Description |
|---|---|---|---|
| heading | string | none | Section heading. |
| description | string | none | Section intro text below the heading. |
| events | FoodEventItem[] | none | Event rows, each with a date badge, image, time/capacity, price, and RSVP button. |
| className | string | none | Extra 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.
More Food Blocks
View all →Loyalty Rewards Program
Four-tier rewards program with points earning steps, benefit lists, and app store download buttons.
Gift Card Shop
Gift card purchase interface with preset amounts, custom input, digital/physical delivery options, and live preview.
Online Ordering Hub
Delivery platform cards with logos, fees, and delivery times alongside pickup info with address and phone.
Expandable Menu Accordion
Collapsible menu items revealing full images, calorie counts, protein info, and allergen badges.
Daily Specials Chalkboard
Dark-themed chalkboard-style menu with decorative corners, day labels, and timestamp.
Dietary Filter Menu
Interactive menu with dietary filter buttons (vegetarian, vegan, gluten-free) and allergen warnings.