Staaarter

Happy Hour Deals

Split-layout promotion with image, schedule badges, and deal list showing original vs. discounted prices. Perfect for happy hour specials and limited-time offers.

By Staaarter Team
Food
Docs
Live preview

Docs

Installation

A real shadcn registry command, not a copy-paste stand-in: it fetches this block plus its button, badge, media-slot dependencies and any missing npm packages, and installs them straight into your project.

npx shadcn add https://staaarter.com/r/happy-hour-deals.json

Prefer not to use the CLI? Copy the source from the Code toggle above into src/components/blocks/food/food21.tsx instead.

Usage

The file also exports food21Demo, the exact props behind the preview above. Spread it to get a working section in one line, then replace it with your own data.

import { Food21, food21Demo } from "@/components/blocks/food/food21";

export default function Page() {
  return <Food21 {...food21Demo} />;
}

Props

PropTypeDefaultDescription
headingstringnoneSection heading.
descriptionstringnoneSection intro text below the heading.
image{ src: string; alt: string }nonePhoto in the left column; falls back to a placeholder when omitted.
schedulestring[][]Badges above the heading describing when the deal runs, e.g. days and hours.
dealsHappyHourDeal[]noneItemized deal list, each showing an original and discounted price.
ctaLabelstringnoneLabel for the CTA button; the button only renders when this is set.
classNamestringnoneExtra classes for the outer section element.

Types

type HappyHourDeal = {
  name: string;
  originalPrice: string;
  dealPrice: string;
};

Behavior notes

  • The schedule badge row, heading, description, and CTA button each only render when their respective prop is set/non-empty.
  • Each deal always shows both originalPrice (struck through) and dealPrice; there is no toggle to hide the original price.
  • The CTA button is decorative and inert: there is no real link or navigation wired up.
  • The image stacks above the content on mobile and sits side-by-side with it from the lg breakpoint up.