# Developer tools bento

> Four tiles with color image placeholders: build time with its change, a copyable command, release checks and build phases.

- Kind: block · Category: Bento · Interactivity: script
- Install: `npx shadcn@latest add @haze/bento-developer-tools`
- File: `src/components/haze/blocks/bento-developer-tools.astro`
- npm dependencies: @lucide/astro
- Registry dependencies: @haze/bento-checklist, @haze/bento-tile, @haze/collapsible, @haze/section-heading, @haze/snippet, @haze/utils
- Docs page: https://hazeui.com/blocks/bento-developer-tools

## Use 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 when
- Visitors need to execute commands in a live shell.

## Alternatives
- [bento-code-intelligence](https://hazeui.com/blocks/bento-code-intelligence.md)
- [terminal-window](https://hazeui.com/ui/terminal-window.md)
- [check-runs](https://hazeui.com/ui/check-runs.md)

## Props

| Name | Type | Default | Required | Description |
|---|---|---|---|---|
| id | `string` | bento-developer-tools | no | ID prefix for the section heading. |
| title | `string` |  | no | Visible section heading. |
| description | `string` |  | no | Context for the example workflow. |
| headingLevel | `1 \| 2 \| 3` | 2 | no | Heading level for the section. |
| command | `string` | pnpm build | no | Displayed command available to copy. |
| timing | `Timing` |  | no | Formatted duration with optional change, trend, context and build phases. |
| checks | `CheckItem[]` |  | no | Ordered list of release requirements and their current states. |
| class | `string` |  | no | Classes on the section wrapper. |

## 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.
- Key Enter / Space: Copy the displayed build command.
- Key Enter / Space: Expand or collapse the release checks.

## Agent prompts

### 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": "https://hazeui.com/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: https://hazeui.com/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.

## Example requests that should lead here
- Show a pnpm build command, its build time and a four-step release gate, each with an image placeholder.

## Source

```astro
---
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>
```
