# Team collaboration bento

> A wide and a narrow tile with color image placeholders, a team availability disclosure and a handoff strip.

- Kind: block · Category: Bento · Interactivity: native
- Install: `npx shadcn@latest add @haze/bento-collaboration`
- File: `src/components/haze/blocks/bento-collaboration.astro`
- npm dependencies: @lucide/astro
- Registry dependencies: @haze/bento-mosaic, @haze/bento-presence, @haze/bento-tile, @haze/button, @haze/section-heading, @haze/utils
- Docs page: https://hazeui.com/blocks/bento-collaboration

## Use when
- A team product shows who is available and who takes the next handoff.
- A collaboration page needs room for two product images.

## Avoid when
- People need to move calendar events or change their availability from the section.

## Alternatives
- [bento-presence](https://hazeui.com/ui/bento-presence.md)
- [kanban-board](https://hazeui.com/ui/kanban-board.md)
- [team-profile-grid](https://hazeui.com/blocks/team-profile-grid.md)

## Props

| Name | Type | Default | Required | Description |
|---|---|---|---|---|
| id | `string` | bento-collaboration | no | Unique section heading ID prefix. |
| title | `string` |  | no | Visible section heading. |
| description | `string` |  | no | Context for the schedule and handoff. |
| headingLevel | `1 \| 2 \| 3` | 2 | no | Heading level for the section. |
| members | `Member[]` |  | no | Roster names, optional roles and availability. |
| handoff | `Handoff \| null` |  | no | Handoff detail with optional link. Pass null to omit the tile. |
| class | `string` |  | no | Classes on the outer section. |

## Accessibility
- Image placeholders are flat, decorative fields that screen readers skip.
- Open the roster to read every name, role and availability in words.
- Key Enter / Space: Expand or collapse team availability.

## Agent prompts

### Install and use

Install the Haze UI block "Team collaboration bento" with `npx shadcn@latest add @haze/bento-collaboration`. 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 BentoCollaboration from "@/components/haze/blocks/bento-collaboration.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-collaboration.md

### Customize with real content

Adapt the Haze bento-collaboration block for our product. Replace the demo values of these props with our real content: id, title, description, headingLevel, members, handoff, class. Keep the layout, the heading level rules and these accessibility details: Image placeholders are flat, decorative fields that screen readers skip. Open the roster to read every name, role and availability in words. Do not add raw color classes; use the Haze tokens.

### Choose the right block

Before using bento-collaboration, check it fits: use it when a team product shows who is available and who takes the next handoff.; a collaboration page needs room for two product images.. Avoid it when people need to move calendar events or change their availability from the section.. Alternatives: @haze/bento-presence, @haze/kanban-board, @haze/team-profile-grid.

## Example requests that should lead here
- Build a team section with two image tiles, an availability roster and the next handoff.

## Source

```astro
---
import { ChevronDown, CornerDownRight } from "@lucide/astro";
import { cn } from "../../../lib/haze/utils";
import BentoMosaic from "../ui/bento-mosaic.astro";
import BentoPresence from "../ui/bento-presence.astro";
import BentoTile from "../ui/bento-tile.astro";
import Button from "../ui/button.astro";
import SectionHeading from "../ui/section-heading.astro";

interface Props {
  id?: string;
  title?: string;
  description?: string;
  headingLevel?: 1 | 2 | 3;
  members?: { name: string; detail?: string; status: "online" | "away" | "offline" }[];
  handoff?: { title: string; detail: string; href?: string; linkLabel?: string } | null;
  class?: string;
}

const {
  id = "bento-collaboration", title = "Know who has the next step", headingLevel = 2,
  description = "See who is working on what today, and who picks up the work next.",
  members = [
    { name: "Iris Chen", detail: "Design", status: "online" },
    { name: "Rafi Okafor", detail: "Engineering", status: "online" },
    { name: "Mina Vale", detail: "Support", status: "away" },
  ],
  handoff = { title: "Next handoff", detail: "Iris sends the approved checkout screens to Rafi at 12:30 UTC." },
  class: className,
} = Astro.props;
const tileHeading = ({ 1: 2, 2: 3, 3: 4 } as const)[headingLevel];
const HandoffHeading = ({ 2: "h2", 3: "h3", 4: "h4" } as const)[tileHeading];
---

<section aria-labelledby={`${id}-title`} class={cn("bg-background px-5 py-12 sm:px-8 sm:py-16 lg:py-20", className)}>
  <div class="mx-auto grid max-w-6xl gap-7 sm:gap-9">
    <SectionHeading id={`${id}-title`} title={title} description={description} headingLevel={headingLevel}
      class="max-w-3xl sm:[&>:first-child]:text-5xl/13 [&_p]:max-w-xl" />
    <BentoMosaic>
      <BentoTile title="Team schedule" span="two-thirds" headingLevel={tileHeading} visualClass="flex-1">
        <div slot="visual" aria-hidden="true" class="min-h-44 sm:min-h-56"></div>
      </BentoTile>
      <BentoTile title="Who's around" headingLevel={tileHeading} span="third" visualClass="flex-1 bg-foreground/6">
        <div slot="visual" aria-hidden="true" class="min-h-44 sm:min-h-56"></div>
        <details class="group/roster min-w-0">
          <summary class="flex min-h-7 cursor-pointer list-none items-center justify-between gap-2 rounded-sm text-sm/5 text-muted-foreground hover:text-foreground focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-ring [&::-webkit-details-marker]:hidden">
            Team availability
            <ChevronDown aria-hidden="true" class="size-4 shrink-0 group-open/roster:rotate-180 motion-safe:transition-[rotate] motion-safe:duration-200 motion-safe:ease-snappy" />
          </summary>
          <BentoPresence members={members} class="pt-3 [&>p:first-child]:hidden" />
        </details>
      </BentoTile>
      {handoff && (
        <article class="flex min-w-0 flex-wrap items-center gap-x-4 gap-y-3 rounded-2xl border border-border bg-card p-4 @md/bento:col-span-full sm:px-6">
          <span aria-hidden="true" class="grid size-9 shrink-0 place-items-center rounded-lg bg-muted text-muted-foreground">
            <CornerDownRight class="size-5" />
          </span>
          <div class="min-w-0 grow basis-44">
            <HandoffHeading class="text-base/6 font-semibold tracking-tight wrap-anywhere">{handoff.title}</HandoffHeading>
            <p class="mt-0.5 max-w-prose text-sm/6 wrap-anywhere text-muted-foreground">{handoff.detail}</p>
          </div>
          {handoff.href && <Button href={handoff.href} variant="outline" size="sm" class="max-w-full wrap-anywhere whitespace-normal">{handoff.linkLabel ?? "View handoff"}</Button>}
        </article>
      )}
    </BentoMosaic>
  </div>
</section>
```
