Developer tools bento
Four tiles with color image placeholders: build time with its change, a copyable command, release checks and build phases.
pnpm dlx shadcn@latest add @haze/bento-developer-tools---
import { ArrowDownRight, ArrowUpRight, Minus } from "@lucide/astro";
import { cn } from "../../../lib/haze/utils";
import BentoChecklist from "../ui/bento-checklist.astro";
import BentoTile from "../ui/bento-tile.astro";
import Collapsible from "../ui/collapsible.astro";
import SectionHeading from "../ui/section-heading.astro";
import Snippet from "../ui/snippet.astro";
interface Props {
id?: string;
title?: string;
description?: string;
headingLevel?: 1 | 2 | 3;
command?: string;
timing?: {
value: string; change?: string; trend?: "up" | "down" | "neutral"; detail?: string;
phases?: { label: string; seconds: number }[];
};
checks?: { label: string; detail?: string; state?: "done" | "current" | "pending" }[];
class?: string;
}
const {
id = "bento-developer-tools", title = "Inside a release build", headingLevel = 2,
description = "Run the build, watch the time come down and follow every check through to sign-off.",
command = "pnpm build",
timing = {
value: "24 s", change: "−8 s", trend: "down", detail: "vs. the previous build",
phases: [{ label: "Resolve", seconds: 4 }, { label: "Compile", seconds: 13 }, { label: "Write", seconds: 7 }],
},
checks = [
{ label: "Types checked", state: "done" }, { label: "Unit tests passed", state: "done" },
{ label: "Preview has been reviewed", state: "done" }, { label: "Release sign-off", state: "current" },
],
class: className,
} = Astro.props;
const tileHeading = ({ 1: 2, 2: 3, 3: 4 } as const)[headingLevel];
const validSeconds = (value?: number): value is number => typeof value === "number" && Number.isFinite(value) && value >= 0;
const phases = (timing.phases ?? []).filter(phase => validSeconds(phase.seconds));
const Trend = { down: ArrowDownRight, up: ArrowUpRight, neutral: Minus }[timing.trend ?? "neutral"];
---
<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">
<SectionHeading id={`${id}-title`} title={title} description={description} headingLevel={headingLevel} align="center"
class="[&_p]:mx-auto [&_p]:max-w-lg sm:[&_:is(h1,h2,h3)]:text-5xl/13" />
<div data-bento-grid class="grid min-w-0 gap-3 md:grid-cols-12 md:gap-4">
<BentoTile title="Build time" description={timing.value} headingLevel={tileHeading} class="md:col-span-5 md:row-span-2" visualClass="flex-1">
<div slot="visual" aria-hidden="true" class="min-h-44 sm:min-h-56"></div>
{(timing.change || timing.detail) && <p class="flex flex-wrap items-center gap-x-2 text-sm/5 text-muted-foreground">
{timing.change && <span class="inline-flex items-center gap-1 font-mono font-medium text-foreground"><Trend aria-hidden="true" class="size-4" />{timing.change}</span>}
{timing.detail}
</p>}
</BentoTile>
<BentoTile title="Run it locally" 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>
<Snippet text={command} prefix="$" copyLabel="Copy build command" class="h-auto min-h-9 [&_code]:whitespace-pre-wrap [&_code]:wrap-anywhere" />
</BentoTile>
<BentoTile title="Release checks" headingLevel={tileHeading} class={phases.length ? "md:col-span-4" : "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>
{checks.length > 0 && <Collapsible title="View checks"><BentoChecklist label="Release checks" items={checks} /></Collapsible>}
</BentoTile>
{phases.length > 0 && <BentoTile title="Build phases" description={phases.map(({ label, seconds }) => `${label} ${seconds} s`).join(" · ")} headingLevel={tileHeading} class="md:col-span-3" visualClass="flex-1 bg-foreground/6">
<div slot="visual" aria-hidden="true" class="min-h-44 sm:min-h-56"></div>
</BentoTile>}
</div>
</div>
</section>When to use
- A developer tool shows its command and build time next to room for product imagery.
- A release overview pairs a build metric with a short list of checks.
When not to use
- Visitors need to execute commands in a live shell.
Installation
Add the Haze registry to components.json once, then install Developer tools bento with the shadcn CLI. Works in any Astro project with Tailwind CSS v4.
pnpm dlx shadcn@latest add @haze/bento-developer-toolsnpx shadcn@latest add @haze/bento-developer-toolsyarn dlx shadcn@latest add @haze/bento-developer-toolsbunx --bun shadcn@latest add @haze/bento-developer-toolsFirst 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-developer-tools | ID prefix for the section heading. |
| title | string | – | Visible section heading. |
| description | string | – | Context for the example workflow. |
| headingLevel | 1 | 2 | 3 | 2 | Heading level for the section. |
| command | string | pnpm build | Displayed command available to copy. |
| timing | Timing | – | Formatted duration with optional change, trend, context and build phases. |
| checks | CheckItem[] | – | Ordered list of release requirements and their current states. |
| class | string | – | Classes on the section wrapper. |
Keyboard interactions
- EnterSpace
- Copy the displayed build command.
- EnterSpace
- Expand or collapse the release checks.
Accessibility
- Image placeholders are flat, decorative fields that screen readers skip.
- The command stays selectable if clipboard scripting is unavailable.
- Check states are announced as part of the list item text.
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 "Developer tools bento" with `npx shadcn@latest add @haze/bento-developer-tools`. 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 BentoDeveloperTools from "@/components/haze/blocks/bento-developer-tools.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-developer-tools.md
Customize with real content
Adapt the Haze bento-developer-tools block for our product. Replace the demo values of these props with our real content: id, title, description, headingLevel, command, timing, checks, class. Keep the layout, the heading level rules and these accessibility details: Image placeholders are flat, decorative fields that screen readers skip. The command stays selectable if clipboard scripting is unavailable. Check states are announced as part of the list item text. Do not add raw color classes; use the Haze tokens.
Choose the right block
Before using bento-developer-tools, check it fits: use it when a developer tool shows its command and build time next to room for product imagery.; a release overview pairs a build metric with a short list of checks.. Avoid it when visitors need to execute commands in a live shell.. Alternatives: @haze/bento-code-intelligence, @haze/terminal-window, @haze/check-runs.
Dependencies
- npm: @lucide/astro
- @haze/bento-checklist
- @haze/bento-tile
- @haze/collapsible
- @haze/section-heading
- @haze/snippet
- @haze/utils
- @haze/theme (one-time setup)
Source · Original Haze UI work.