Pro
Repo city
A repository as a city: districts are folders, buildings are files. Footprint is size and height is how much a file changed lately, so a big quiet file and a small busy one are different at a glance. The three busiest are ember. A switch makes height size too, for the plain treemap.
pnpm dlx shadcn@latest add @caliper/repo-cityWhen to use
Use it for
- Finding hotspots: where a codebase changes most and where that overlaps with size.
- Reviews and handovers that need a picture of a repository before the details.
Skip it when
- Comparing exact values across many files; use the ranked list or a table.
- Repositories with thousands of files; roll them up into folders first.
Decisions
Why it is built this way, so you know what to keep when you change your copy.
Behaviour
- Every building is a button with its facts
- Each one is named with its path, size, changes and whether it is a hotspot. The ranked list beside it holds the same files and is the quick way in by keyboard.
- Height has a plain mode
- Switching to size makes the city an ordinary treemap with extrusion, so the second measure can be turned off without losing the layout.
Styling
- Ember marks only the hottest
- Everything else shades from the surface to the ink by changes, so colour repeats what height says.
Installation
pnpm dlx shadcn@latest add @caliper/repo-city
Adds its 6 files to components/ui/, each with its own stylesheet, and installs their packages. Pro installs with your access token, set up once per project. See Pro access. The first part also adds Caliper UI’s tokens; import them once as in Installation.
Usage
Import it from your copy of the source. The example behind the preview comes with the source.
import { RepoCity } from "@/components/ui/repo-city"
The worked example comes with Pro
The 35-line example behind the preview opens here, ready to copy.
- 626 Pro parts, blocks and page templates, all with source
- $149 once, with lifetime updates. No renewal
- A full refund within 14 days if it is not for you
API reference
RepoCity
component
Accessibility
It exposes group semantics, with aria-label, aria-hidden, aria-pressed and aria-live kept in step with state. Changes that matter are announced through a live region.
Motion
It declares no animation in its component source. Any transition comes from its stylesheet, which uses the duration tokens that collapse to instant under prefers-reduced-motion.
Related
- TreemapNested rectangles sized by value, with drill-down.
- Icicle chartA hierarchy as stacked rows, each block as wide as its share. Choose a block to zoom; it widens and its descendants spread beneath it. Escape steps out.
- SunburstA radial hierarchy where each ring is a level and each arc a share of its parent.
- File treeA keyboard-navigable tree for folders and files.