Skip to content
ProLifetime access for $199, paid once, every future release included
Truffle UI

Restaurant Menu

ProNew

A menu with section tabs, dish photos, prices and dietary marks, as a list, text columns with dotted leaders or photo cards.

Installation

pnpm dlx shadcn@latest add @viewport/restaurant-menu

First time? Add the @viewport registry to components.json. Setup takes one minute.

Usage

The code behind the preview above comes with Truffle Pro.

Props

PropTypeDefault
sections*MenuSection[]—
layout"list" | "grid" | "cards"

`list` is rows with a thumbnail and the price on the right, `grid` is text columns with dotted leaders, `cards` is photo cards.

"list"
tabsboolean

Shows one section at a time behind tabs. Turn off to print every section one after another.

true
titlestring

Heading above the menu.

—
accentstring

Any CSS color for the active tab, section headings and marks.

—
columns2 | 3

Most columns in the `grid` and `cards` layouts.

2
leadersboolean

Dotted line between the name and the price in the `grid` layout.

true
uppercaseboolean

Sets dish names and tabs in capitals.

false
align"left" | "center"

Text alignment in the `grid` and `cards` layouts. Centering moves the price under the description.

"left"
legendboolean

Explains the dietary marks under the menu.

true
currencystring

ISO 4217 code used for numeric prices.

"USD"
localestring"en-US"
defaultSectionstring

Id of the section that starts selected.

—
onSectionChange(id: string) => void

Called when the visitor switches section.

—
classNamestring—

Accessibility

  • Sections are a real tab list: arrow keys move between tabs, Home and End jump to the ends, Tab goes into the dishes.
  • Dietary marks are images named “Vegan” or “Contains nuts”, and a legend under the menu spells them out.
  • Sold-out dishes say “Sold out” in text, not only by dimming the photo.
  • The tab underline and the section fade do not animate under reduced motion.