Bento grid

Five cards of two sizes packed into one tidy block, each with a small picture of the feature: a release list, two switches, a figure with bars, a pair of keys and a strip of your colour breaking into dots.

Everything in its place

Five small things in one tidy grid.

  • Landing pageLive
  • Pricing updateBeta
  • Checkout flowDraft

One list for every release

See what is live, what is in beta and what is still a draft.

  • Email digest
  • Push alerts

Quiet by default

One summary a day. Turn on more if you want it.

98.2%

Shipped on time

Up from 91% last month.

A key for everything

Search, jump and ship without the mouse.

In your colour

Change one value and every part follows.

Options

Screen
Colour

Code

import "./bento-grid.css";
import "./badge.css";

const releases = [
  { name: "Landing page", status: "Live", tone: "green" },
  { name: "Pricing update", status: "Beta", tone: "blue" },
  { name: "Checkout flow", status: "Draft" },
];
const alerts = [
  { name: "Email digest", on: true },
  { name: "Push alerts", on: false },
];
const weeks = [42, 58, 50, 71, 64, 83, 100];

function Card({ wide, art, artClass = "", title, children }) {
  return (
    <article className={"dh-bgrid-card" + (wide ? " dh-bgrid-card--wide" : "")}>
      <div className={"dh-bgrid-art " + artClass}>{art}</div>
      <h3>{title}</h3>
      <p>{children}</p>
    </article>
  );
}

export function BentoGrid() {
  return (
    <section className="dh-bgrid">
      <div className="dh-bgrid-head">
        <h2>Everything in its place</h2>
        <p>Five small things in one tidy grid.</p>
      </div>
      <div className="dh-bgrid-grid">
        <Card
          wide
          title="One list for every release"
          art={
            <ul className="dh-bgrid-rows">
              {releases.map((release) => (
                <li key={release.name}>
                  <span>{release.name}</span>
                  <span className={"dh-badge" + (release.tone ? " dh-badge--" + release.tone : "")}>{release.status}</span>
                </li>
              ))}
            </ul>
          }
        >
          See what is live, what is in beta and what is still a draft.
        </Card>
        <Card
          title="Quiet by default"
          art={
            <ul className="dh-bgrid-rows">
              {alerts.map((alert) => (
                <li key={alert.name}>
                  <span>{alert.name}</span>
                  <i className="dh-bgrid-switch" data-on={alert.on ? "" : undefined} />
                </li>
              ))}
            </ul>
          }
        >
          One summary a day. Turn on more if you want it.
        </Card>
        <Card
          title="Shipped on time"
          artClass="dh-bgrid-art--figure"
          art={
            <>
              <strong>98.2%</strong>
              <div className="dh-bgrid-bars" aria-hidden>
                {weeks.map((height, index) => (
                  <i key={index} style={{ "--h": height + "%" }} />
                ))}
              </div>
            </>
          }
        >
          Up from 91% last month.
        </Card>
        <Card
          title="A key for everything"
          art={
            <div className="dh-bgrid-keys" aria-hidden>
              <kbd>⌘</kbd>
              <kbd>K</kbd>
            </div>
          }
        >
          Search, jump and ship without the mouse.
        </Card>
        <Card title="In your colour" artClass="dh-bgrid-art--bleed" art={<div className="dh-bgrid-dither" aria-hidden />}>
          Change one value and every part follows.
        </Card>
      </div>
    </section>
  );
}

Everything in its place

Five small things in one tidy grid.

  • Landing pageLive
  • Pricing updateBeta
  • Checkout flowDraft

One list for every release

See what is live, what is in beta and what is still a draft.

  • Email digest
  • Push alerts

Quiet by default

One summary a day. Turn on more if you want it.

98.2%

Shipped on time

Up from 91% last month.

A key for everything

Search, jump and ship without the mouse.

In your colour

Change one value and every part follows.