Skip to content
ProLifetime access for $199, paid once, every future release included
Truffle UI

Fleet Grid

ProNew

A fleet as one cell per instance, grouped by region and colored by state. The legend counts each state and filters to it; pointing at a cell names the instance beneath the grid.

Installation

pnpm dlx shadcn@latest add @viewport/fleet-grid

First time? Add the @viewport registry to components.json. Setup takes one minute.

Usage

The code behind the preview above comes with Truffle Pro.

Props

PropTypeDefault
instances*FleetInstance[]—
onSelect(id: string) => void

Called when an instance is pressed, e.g. to open it.

—
nounstring

What an instance is called, and its plural, e.g. "sandbox" and "sandboxes".

"instance"
nounPluralstring`${noun}s`
classNamestring—

Accessibility

  • Each cell is a button named with its ID, state and detail; arrow keys move between cells.
  • Failed cells carry a notch as well as a color.
  • The legend's filters are pressed-state buttons with counts.
  • Starting cells pulse only when motion is allowed.