Order, banner
betaA 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
- Pairs with
- Hours, weekContact, links
Installation
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):
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
| Field | Type | Limits | Guidance |
|---|---|---|---|
headline | string | 6–60 chars | The offer, as an invitation: 'Hungry? We deliver in Akwa and Bonapriso'. |
sublineoptional | string | ≤ 160 chars | How it works: when, where, how long. |
whatsappoptional | object | ||
whatsapp.number | string | In international format, spaces allowed: '+237 6 99 00 00 00'. | |
whatsapp.label | string | 1–32 chars | 'Order on WhatsApp' |
whatsapp.messageoptional | string | ≤ 200 chars | The message the chat opens with: 'Hello, I would like to order…'. |
phoneoptional | object | ||
phone.number | string | In international format, spaces allowed: '+237 6 99 00 00 00'. | |
phone.label | string | 1–32 chars | 'Call us' |
noteoptional | string | ≤ 80 chars | Small print: 'Delivery from 1,000 FCFA'. |
Props
| Prop | Notes |
|---|---|
content | OrderBannerContent; the example when left out |
id | the section's id, for anchor links; "order" by default |
headingLevel | 1, 2 or 3: the heading's tag; 2 by default |
className | on 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.