Skip to content
New

Menu, cards

beta

Signature dishes as cards: a photo, tags, a line and the price, each with an order link that opens WhatsApp with the dish written.

npx rasengan-ui add menu-cards

Our signature dishes

The plates people cross the city for, cooked every day from the morning market.

  • A bowl of dark green ndolé topped with prawns.

    Ndolé with prawns

    house favourite

    Bitter leaves, peanuts and prawns, with fried plantain.

    FCFA 4,500Order
  • A whole grilled fish on a plate with sliced onions.

    Braised bar fish

    spicy

    Whole fish from the grill, onions, pepper and miondo.

    FCFA 6,000Order
  • Fried ripe plantain beside a bowl of red beans.

    Plantain and beans

    vegetarian

    Ripe plantain, red beans in palm oil.

    FCFA 2,500Order
  • A salad of avocado, tomato and red onion.

    Avocado and tomato salad

    vegetarian

    With onions, lime and pepper.

    FCFA 2,000Order
  • Golden puff-puff beside slices of pineapple and papaya.

    Puff-puff and fruit

    Warm doughnuts, pineapple and papaya.

    FCFA 1,500Order
  • A plate of chicken stewed with plantain and vegetables.

    Poulet DG

    new

    Chicken, plantain, carrots and green beans.

    FCFA 5,500Order
Use it
A restaurant, a bakery or a café showing its best plates, with good photos of them.
Avoid it
The whole menu: use menu-categories or menu-list, and link to it from here.
Built with
BadgeButton

Installation

Terminal
npx rasengan-ui add menu-cards

It installs into components/blocks/menu-cards/, with what it uses (Badge, Button) and lib/blocks.ts.

Usage

Without content, the block shows its example. Pass your own, typed by the block's schema, from a content file (here, the example with one field changed):

app/_routes/index.page.tsx
import { MenuCards } from "@/components/blocks/menu-cards";
import { home } from "@/content/home";
 
export default function Home() {
  return <MenuCards content={home.dishes} />;
}
content/home.ts
import { example, type MenuCardsContent } from "@/components/blocks/menu-cards";
 
export const home = {
  dishes: { ...example, title: "This week's favourites" } satisfies MenuCardsContent,
};

Each card's order link opens order.channel (WhatsApp, a text or an email) with order.message and the dish's name written. Leave order out for cards without a link. Three, six or nine dishes fill the grid evenly.

Content

FieldTypeLimitsGuidance
titlestring2–48 chars'Our signature dishes', 'Popular this week'.
sublineoptionalstring≤ 160 charsWhy these: the house favourites, what's in season.
dishesobject[]2–9 itemsThree, six or nine read best: the grid has up to three columns.
dishes[].namestring1–48 chars
dishes[].descriptionoptionalstring≤ 140 chars
dishes[].priceobject
dishes[].price.amountnumber≥ 0
dishes[].price.currencystring3–3 charsAn ISO 4217 code: 'EUR', 'USD', 'XAF'.
dishes[].tagsoptionalstring[]≤ 3 itemsShort labels: 'spicy', 'vegetarian', 'new'.
dishes[].imageobjectThe dish, landscape (4:3). Its alt says what is on the plate.
dishes[].image.srcstringA local path ('/images/terrace.jpg') or the project's asset URL.
dishes[].image.altstring≤ 140 charsWhat the image shows, for people who cannot see it. Empty only if purely decorative.
dishes[].image.widthinteger
dishes[].image.heightinteger
orderoptionalobjectAn order link on each card, opening WhatsApp, a text or an email with the dish written.
order.channelobject
order.channel.kind"whatsapp" | "sms" | "email"Where the visitor's message opens: their WhatsApp, their texts, or their mail app.
order.channel.tostring1–120 charsThe business's number in international form, or its email address.
order.labelstring1–20 charsOn each card: 'Order', 'Order this'.
order.messagestring1–120 charsThe message opens with this, then the dish's name: 'Hello, I would like to order:'.
ctaoptionalobjectUnder the grid: 'See the whole menu'.
cta.labelstring1–32 charsA verb first, two to four words: 'Start free', 'Book a table'.
cta.hrefstringA path ('/pricing'), an anchor ('#menu'), or a full URL.
localeoptionalstringA BCP 47 locale for prices ('en-CM'); the page's language when left out.

Props

PropNotes
contentMenuCardsContent; the example when left out
idthe section's id, for anchor links; "dishes" by default
headingLevel1, 2 or 3: the heading's tag; 2 by default
classNameon the <section>, for spacing

Accessibility

  • Each order link is named with its dish ("Order Ndolé with prawns"), not only "Order".
  • Photos have their own alt; tags are text, not colour alone.