Restaurant Menu
ProNewA menu with section tabs, dish photos, prices and dietary marks, as a list, text columns with dotted leaders or photo cards.
Installation
First time? Add the @viewport registry to components.json. Setup takes one minute.
Usage
Props
| Prop | Type | Default |
|---|---|---|
| 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" |
| tabs | booleanShows one section at a time behind tabs. Turn off to print every section one after another. | true |
| title | stringHeading above the menu. | — |
| accent | stringAny CSS color for the active tab, section headings and marks. | — |
| columns | 2 | 3Most columns in the `grid` and `cards` layouts. | 2 |
| leaders | booleanDotted line between the name and the price in the `grid` layout. | true |
| uppercase | booleanSets 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" |
| legend | booleanExplains the dietary marks under the menu. | true |
| currency | stringISO 4217 code used for numeric prices. | "USD" |
| locale | string | "en-US" |
| defaultSection | stringId of the section that starts selected. | — |
| onSectionChange | (id: string) => voidCalled when the visitor switches section. | — |
| className | string | — |
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.