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/featured-dishes-grid.jsonPrefer not to use the CLI? Copy the source from the Code toggle above into src/components/blocks/food/food11.tsx instead.
Usage
The file also exports food11Demo, 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 { Food11, food11Demo } from "@/components/blocks/food/food11"; export default function Page() { return <Food11 {...food11Demo} />; }
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| heading | ReactNode | none | Section heading. |
| description | string | undefined | Short intro line under the heading. |
| dishes | Dish[] | none | Dish cards in the grid. |
| orderLabel | string | "Order now" | Label for every dish's order button. |
| className | string | none | Extra classes for the outer section element. |
Types
interface Dish { name: string; description: string; price: string; image?: { src: string; alt: string }; href?: string; }
Behavior notes
- The image zoom and description/order-button overlay are pure CSS (group-hover:scale-110 and an opacity transition), not JS state, so this stays a server component.
- The order button renders as a real link when a dish sets href, and as an inert, non-functional button (no onClick, since a server component can't have one) when href is omitted - there is no cart or ordering logic behind it either way.
- Name and price stay visible below the image at all times; only the description and order button are hidden until hover/focus reveals the overlay.
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.