Staaarter

Classic Menu Layout

Traditional menu with categorized sections, dietary badges (V, VG, GF), and a legend. Perfect for restaurant menus and food ordering pages.

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 badge dependencies and any missing npm packages, and installs them straight into your project.

npx shadcn add https://staaarter.com/r/classic-menu-layout.json

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

Usage

The file also exports food16Demo, 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 { Food16, food16Demo } from "@/components/blocks/food/food16";

export default function Page() {
  return <Food16 {...food16Demo} />;
}

Props

PropTypeDefaultDescription
headingstringnoneSection heading above the menu.
descriptionstringnoneSection intro text below the heading.
categoriesMenuCategoryEntry[]noneOrdered list of menu sections, each with its own item list.
classNamestringnoneExtra classes for the outer section element.

Types

type DietaryCode = "V" | "VG" | "GF";

type MenuItemEntry = {
  name: string;
  description?: string;
  price: string;
  dietary?: DietaryCode[];
};

type MenuCategoryEntry = {
  name: string;
  items: MenuItemEntry[];
};

Behavior notes

  • The heading/description block only renders when at least one of the two is set.
  • The V / VG / GF legend is always shown as a fixed reference row regardless of whether any menu item actually uses those codes.
  • An item's dietary badges render inline next to its name only when that item's dietary array has entries; items with no dietary array show no badges.
  • This is a static, read-only menu listing: there is no ordering, filtering, or cart interactivity, matching a printed or wall-mounted menu.