Skip to Content

Cell Plate

Bordered hairline grid of feature cells for spec sheets and tile grids: a Grid rendered as a list at a hairline gap, so the frame shows between cells. Rounded, straight or divided variants across one to six columns.

Installation

pnpm dlx shadcn@latest add @01orbital/cell-plate

Usage

import {
  CellPlate,
  CellPlateItem,
} from "@/components/cell-plate/cell-plate"

// One cell per line of the spec sheet.
const SPECS = [
  {
    title: "Film grain",
    body: "A grain layer you can turn up, down or off.",
  },
  {
    title: "OKLCH palettes",
    body: "Colors that stay even in light and dark.",
  },
  {
    title: "Base UI",
    body: "Accessible primitives under every control.",
  },
  {
    title: "Your tokens",
    body: "Every piece reads the theme you already have.",
  },
  {
    title: "Source in your repo",
    body: "One command copies the code. It is yours to edit.",
  },
  {
    title: "Pay once",
    body: "One license, updates for the life of the product.",
  },
] as const

/** A Cell Plate spec sheet: six cells ruled by hairlines, three across from
 * 48rem. */
export default function CellPlateDemo() {
  return (
    <CellPlate cols={3} className="max-w-4xl">
      {SPECS.map((spec) => (
        <CellPlateItem key={spec.title}>
          <h3 className="font-medium">{spec.title}</h3>
          <p className="text-sm/6 text-muted-foreground">{spec.body}</p>
        </CellPlateItem>
      ))}
    </CellPlate>
  )
}

This example installs with everything it uses:

pnpm dlx shadcn@latest add @01orbital/cell-plate-demo

Anatomy

Cell Plate is built from 2 parts. In the example they nest like this:

CellPlate
└─ CellPlateItem
  • CellPlate: A ruled plate: the frame shows through the hairline gaps between the cells. straight drops the corners; divided drops the frame, lines between cells only.
  • CellPlateItem: One cell, an li on the page background with 32px padding (40px from sm).

API reference

CellPlate

A ruled plate: the frame shows through the hairline gaps between the cells. straight drops the corners; divided drops the frame, lines between cells only.

A Grid at the hairline gap, rendered as a list. Grid owns the container and columns; the plate keeps its frame, clip and corners on the list itself.

Prop

Type

It also accepts the props of the Base UI part it wraps, and the HTML attributes of the element it renders.

CellPlateItem

One cell, an li on the page background with 32px padding (40px from sm).

It accepts the props of the Base UI part it wraps, and the HTML attributes of the element it renders.

Dependencies

npm: @base-ui/react, class-variance-authority, cn. The CLI installs them for you.

Requires these pieces. The CLI adds each one that is missing and won't replace a file you already have unless you choose to:

Used in blocks

One block is built with Cell Plate.

Last updated on