Operations bento
Four color image placeholder tiles for queues, on-call, the current incident and availability, with an incident log and history.
pnpm dlx shadcn@latest add @haze/bento-operations---
import { cn } from "../../../lib/haze/utils";
import BentoTile from "../ui/bento-tile.astro";
import Collapsible from "../ui/collapsible.astro";
import SectionHeading from "../ui/section-heading.astro";
import Timeline from "../ui/timeline.astro";
interface Props {
id?: string;
title?: string;
description?: string;
headingLevel?: 1 | 2 | 3;
incident?: { title: string; status: string };
updates?: { title: string; date?: string; datetime?: string; description?: string; current?: boolean }[];
onCall?: { name: string; detail: string } | null;
uptime?: { label: string; status: "operational" | "degraded" | "outage" | "no-data" }[];
class?: string;
}
const {
id = "bento-operations", title = "Keep deliveries moving", headingLevel = 2,
description = "Watch queues, incidents and uptime in one place, and know who is carrying the pager.",
incident = { title: "Webhook delivery delays", status: "Monitoring" },
updates = [
{ title: "Delay detected", date: "09:02 UTC", description: "Retry jobs began waiting longer than 30 seconds." },
{ title: "Workers scaled up", date: "09:14 UTC", description: "Extra workers are processing the backlog." },
{ title: "Delivery recovered", date: "09:27 UTC", description: "The team is watching delivery times before closing the incident." },
],
onCall = { name: "Amina Park", detail: "On call until 16:00 UTC" },
uptime = [
{ label: "Mon", status: "operational" }, { label: "Tue", status: "operational" },
{ label: "Wed", status: "degraded" }, { label: "Thu", status: "operational" },
{ label: "Fri", status: "operational" }, { label: "Sat", status: "operational" },
{ label: "Sun", status: "operational" },
],
class: className,
} = Astro.props;
const tileHeading = ({ 1: 2, 2: 3, 3: 4 } as const)[headingLevel];
const statusLabel = { operational: "Operational", degraded: "Degraded", outage: "Outage", "no-data": "No data" };
const operational = uptime.filter(period => period.status === "operational").length;
---
<section aria-labelledby={`${id}-title`} class={cn("bg-background px-4 py-14 sm:px-8 sm:py-20", className)}>
<div class="mx-auto grid max-w-6xl gap-8 sm:gap-10">
<header class="grid items-end gap-3 md:grid-cols-[1.3fr_1fr] md:gap-12">
<SectionHeading id={`${id}-title`} title={title} headingLevel={headingLevel}
class="[&_:is(h1,h2,h3)]:max-w-[15ch] sm:[&_:is(h1,h2,h3)]:text-5xl/13" />
{description && <p class="max-w-lg text-pretty text-base/7 text-muted-foreground">{description}</p>}
</header>
<div data-bento-grid class="grid min-w-0 gap-3 md:grid-cols-12 md:gap-4">
<BentoTile title="Queue capacity" description="Jobs in the current dispatch window." headingLevel={tileHeading}
class={onCall ? "md:col-span-7" : "md:col-span-12"} visualClass="flex-1">
<div slot="visual" aria-hidden="true" class="min-h-44 sm:min-h-56"></div>
</BentoTile>
{onCall && (
<BentoTile title="On-call handoff" description={`${onCall.name} · ${onCall.detail}`} headingLevel={tileHeading} class="md:col-span-5" visualClass="flex-1 bg-foreground/6">
<div slot="visual" aria-hidden="true" class="min-h-44 sm:min-h-56"></div>
</BentoTile>
)}
<BentoTile title={incident.title} description={incident.status} headingLevel={tileHeading} class="md:col-span-5" visualClass="flex-1 bg-foreground/6">
<div slot="visual" aria-hidden="true" class="min-h-44 sm:min-h-56"></div>
{updates.length > 0 && <Collapsible title="Incident log"><Timeline items={updates} /></Collapsible>}
</BentoTile>
<BentoTile title="Service availability" description={`${operational} of ${uptime.length} days operational`} headingLevel={tileHeading} class="md:col-span-7" visualClass="flex-1 bg-foreground/6">
<div slot="visual" aria-hidden="true" class="min-h-44 sm:min-h-56"></div>
{uptime.length > 0 && <Collapsible title="View history">
<dl class="grid gap-1.5">{uptime.map(period => (
<div class="flex flex-wrap justify-between gap-x-2"><dt class="wrap-anywhere">{period.label}</dt><dd class="text-foreground">{statusLabel[period.status]}</dd></div>
))}</dl>
</Collapsible>}
</BentoTile>
</div>
</div>
</section>When to use
- An operations page shows the current incident and who is on call.
- The next operator needs the incident status and availability in one view.
When not to use
- People need to page an engineer or resolve incidents from the panel.
Installation
Add the Haze registry to components.json once, then install Operations bento with the shadcn CLI. Works in any Astro project with Tailwind CSS v4.
pnpm dlx shadcn@latest add @haze/bento-operationsnpx shadcn@latest add @haze/bento-operationsyarn dlx shadcn@latest add @haze/bento-operationsbunx --bun shadcn@latest add @haze/bento-operationsFirst time? Registry and theme setup
1. Add to components.json:
{
"registries": {
"@haze": "http://localhost:4329/r/{name}.json"
}
}2. Install the theme once: npx shadcn@latest add @haze/theme, then import it after Tailwind in your global CSS:@import "./haze.css";
API reference
| Prop | Type | Default | Description |
|---|---|---|---|
| id | string | bento-operations | Unique section ID prefix. Set it for each instance. |
| title | string | – | Visible section heading. |
| description | string | – | Short description of the handoff context. |
| headingLevel | 1 | 2 | 3 | 2 | Heading level for the section. |
| incident | Incident | – | Incident title and status text. |
| updates | TimelineItem[] | – | Chronological updates with titles, optional date text and descriptions. |
| onCall | OnCall | null | – | Engineer name and shift detail. Pass null to hide. |
| uptime | UptimePeriod[] | – | Labeled service periods with availability state. |
| class | string | – | Classes on the section. |
Keyboard interactions
- EnterSpace
- Expand or collapse the incident log or availability history.
Accessibility
- Each color field stands in for a product image and is aria-hidden.
- The incident log and availability history can be read as text in their disclosures.
Notes for AI
Copy into Claude Code, Cursor, Codex or any coding agent. Agents can also read the Markdown version of this page.
Install and use
Install the Haze UI block "Operations bento" with `npx shadcn@latest add @haze/bento-operations`. If components.json has no "@haze" registry yet, add "registries": { "@haze": "http://localhost:4329/r/{name}.json" }. If src/styles/haze.css does not exist yet, run `npx shadcn@latest add @haze/theme` once and import it from the global stylesheet after Tailwind. The CLI stops at an overwrite question when a Haze file already exists and differs, even with --yes, and then installs nothing after it: read its output. If the user has not edited their Haze files, re-run with --overwrite to take the registry versions; if they have, ask them before overwriting. Then import BentoOperations from "@/components/haze/blocks/bento-operations.astro" (or the relative path) and render it where it fits the page. Keep Haze token classes (bg-background, text-muted-foreground, border-border...) and never hardcode colors. Docs: http://localhost:4329/blocks/bento-operations.md
Customize with real content
Adapt the Haze bento-operations block for our product. Replace the demo values of these props with our real content: id, title, description, headingLevel, incident, updates, onCall, uptime, class. Keep the layout, the heading level rules and these accessibility details: Each color field stands in for a product image and is aria-hidden. The incident log and availability history can be read as text in their disclosures. Do not add raw color classes; use the Haze tokens.
Choose the right block
Before using bento-operations, check it fits: use it when an operations page shows the current incident and who is on call.; the next operator needs the incident status and availability in one view.. Avoid it when people need to page an engineer or resolve incidents from the panel.. Alternatives: @haze/bento-trust-analytics, @haze/timeline, @haze/uptime-tracker.
Dependencies
- @haze/bento-tile
- @haze/collapsible
- @haze/section-heading
- @haze/timeline
- @haze/utils
- @haze/theme (one-time setup)
Source · Original Haze UI work.