Review wall

A wall of short reviews in three columns: a face, a name, a handle and what they said, each card opening the post it came from. Two columns, then one, as it narrows.

Options

Screen

Code

import "./review-wall.css";

const reviews = [
  { name: "Mara Lindqvist", handle: "maralind", avatar: "/blocks/dash-face-1.jpg", text: "Set it up on Friday, shipped on Monday. I did not open the docs once.", mark: "shipped on Monday", href: "#" },
  { name: "Theo Okafor", handle: "theobuilds", avatar: "/blocks/dash-face-2.jpg", text: "The first tool this year that my whole team agreed on.", mark: "my whole team agreed on", href: "#" },
  { name: "Ines Carvalho", handle: "inescodes", avatar: "/blocks/dash-face-3.jpg", text: "Cut our release notes from an afternoon to about ten minutes. The summaries read like a person wrote them.", mark: "about ten minutes", href: "#" },
  { name: "Jonas Weber", handle: "jonasw", avatar: "/blocks/dash-face-4.jpg", text: "Quiet, fast, and it stays out of the way. More of this please.", mark: "stays out of the way", href: "#" },
  { name: "Priya Raman", handle: "priyaships", avatar: "/blocks/dash-face-5.jpg", text: "I keep waiting for the catch. Three months in, still none.", mark: "still none", href: "#" },
  { name: "Caleb Stone", handle: "calebstone", avatar: "/blocks/dash-face-6.jpg", text: "Moved four projects over in a weekend. Nothing broke, which never happens.", mark: "Nothing broke", href: "#" },
  { name: "Yuki Tanaka", handle: "yukit", avatar: "/blocks/dash-face-7.jpg", text: "The keyboard shortcuts alone are worth it.", mark: "worth it", href: "#" },
  { name: "Amara Diallo", handle: "amarad", avatar: "/blocks/dash-face-8.jpg", text: "Support answered in six minutes, on a Sunday, with the actual fix.", mark: "six minutes", href: "#" },
  { name: "Felix Moreau", handle: "felixmoreau", avatar: "/blocks/bento-avatar-1.jpg", text: "Finally something that looks as good in dark mode as it does in light.", mark: "as good in dark mode", href: "#" },
  { name: "Noor Haddad", handle: "noorh", avatar: "/blocks/bento-avatar-2.jpg", text: "We replaced three tools with this one and the bill went down.", mark: "the bill went down", href: "#" },
  { name: "Sam Whitaker", handle: "samwhit", avatar: "/blocks/bento-avatar-3.jpg", text: "Bookmarked, starred, told the group chat.", mark: "told the group chat", href: "#" },
  { name: "Lena Fischer", handle: "lenaf", avatar: "/blocks/bento-avatar-4.jpg", text: "It does one thing and does it properly. Rare.", mark: "does it properly", href: "#" },
];

function Review({ review, hidden }) {
  const found = review.mark ? review.text.indexOf(review.mark) : -1;
  const before = found < 0 ? review.text : review.text.slice(0, found);
  const after = found < 0 ? "" : review.text.slice(found + review.mark.length);
  return (
    <a className="dh-rwall-card" href={review.href} tabIndex={hidden ? -1 : undefined}>
      <span className="dh-rwall-who">
        <img src={review.avatar} alt="" width="36" height="36" />
        <span>
          <strong>{review.name}</strong>
          <small>@{review.handle}</small>
        </span>
        <svg viewBox="0 0 24 24" width="13" height="13" fill="currentColor" aria-hidden>
          <path d="M18.24 2.25h3.31l-7.23 8.26 8.5 11.24h-6.65l-5.22-6.82-5.96 6.82H1.68l7.73-8.84L1.25 2.25h6.83l4.71 6.23zm-1.16 17.52h1.83L7.08 4.13H5.12z" />
        </svg>
      </span>
      <span className="dh-rwall-text">
        {before}
        {review.mark && found >= 0 && <b>{review.mark}</b>}
        {after}
      </span>
    </a>
  );
}

export function ReviewWall({ items = reviews }) {
  return (
    <section className="dh-rwall">
      <div className="dh-rwall-head">
        <div>
          <h2>Kind words</h2>
          <p>What people said in the first week. Each one opens the post it came from.</p>
        </div>
        <a className="dh-rwall-more" href="#">Read them all</a>
      </div>
      <ul className="dh-rwall-list">
        {items.map((review) => (
          <li key={review.handle}>
            <Review review={review} />
          </li>
        ))}
      </ul>
    </section>
  );
}

Kind words

What people said in the first week. Each one opens the post it came from.

Read them all