Skip to content
New

Order, banner

beta

A band in the brand colour that invites an order: a headline, how delivery works, and WhatsApp and phone buttons.

npx rasengan-ui add order-banner

Hungry? We deliver in Akwa and Bonapriso

Order before 21:30 and your food arrives hot in about forty minutes. Pay on delivery, in cash or mobile money.

Delivery from 1,000 FCFA, free above 15,000 FCFA.

Use it
A business that takes orders by message or phone: restaurants, bakeries, shops that deliver.
Avoid it
Online checkout: link to the shop instead.
Built with
Button

Installation

Terminal
npx rasengan-ui add order-banner

It installs into components/blocks/order-banner/, with what it uses (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 { OrderBanner } from "@/components/blocks/order-banner";
import { home } from "@/content/home";
 
export default function Home() {
  return <OrderBanner content={home.order} />;
}
content/home.ts
import { example, type OrderBannerContent } from "@/components/blocks/order-banner";
 
export const home = {
  order: {
    ...example,
    headline: "Order now, we deliver",
  } satisfies OrderBannerContent,
};

The WhatsApp button opens a chat with message already typed; the phone button calls. Give one or both. The band takes the primary colour, so it follows the nature.

Content

FieldTypeLimitsGuidance
headlinestring6–60 charsThe offer, as an invitation: 'Hungry? We deliver in Akwa and Bonapriso'.
sublineoptionalstring≤ 160 charsHow it works: when, where, how long.
whatsappoptionalobject
whatsapp.numberstringIn international format, spaces allowed: '+237 6 99 00 00 00'.
whatsapp.labelstring1–32 chars'Order on WhatsApp'
whatsapp.messageoptionalstring≤ 200 charsThe message the chat opens with: 'Hello, I would like to order…'.
phoneoptionalobject
phone.numberstringIn international format, spaces allowed: '+237 6 99 00 00 00'.
phone.labelstring1–32 chars'Call us'
noteoptionalstring≤ 80 charsSmall print: 'Delivery from 1,000 FCFA'.

Props

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

Accessibility

  • The numbers are written on the buttons, not only in their links.
  • Text on the band is the primary's foreground, the pair the contract checks for contrast.