High Command
LibraryTemplatesGet startedPricing
Get Pro · $79

Guide

Browse everythingGetting startedThemingYour data

Site

HomeTemplatesPricingChangelog

Templates 4

Command centerProFleetProCustomer trackingProField servicePro

Ops and shell 9

App shellProOps modelProAttention queueProMorning briefProShift handoverProLane panelProOwn-fleet partsProAgent action barProCustomizable dashboardPro

Map 17

PMTiles basemapPMTiles routeTrip hologramProBasemap styleMap geometryMapLand texture and dot lensProException heatmap and risk contoursProLane arcsProShipment layerOwn fleet layerProFleet map layersCurated place labels and sitesRoute traceEdge chipsProMap key, filters and paddingMap kitPro

Time and trips 11

Time and trip modelsEvent fieldProIn-transit rowsProImpact lineProActivity barProReplay clockTime controlPlayback overlayProTrip timetableProStage rowWeek cursorPro

Figures, charts and tables 14

Sourced valueKey-figure tileFigure groupPart barBand sparklineKPI stripProChart kitPop barWaterfall cascadeMargin chartsPro13-week cash ladderProWork tableProField railProHorizon gridPro

Zones and dispatch 10

Zones modelDispatch modelProGeofence layerGeofence eventsGeofence drawProService ringsDensity heatmapJob queueProAssign dialogProStop listPro

Design system 3

ThemeShared helpersUI primitives

Routing 3

Offline road routerAustin road graphAustin areas

Libraries 2

Fleet coreRoute core
High Command

Map, fleet and ops-console components for React. Built in-house, copied into your app with the shadcn CLI.

Product

  • Library
  • Templates
  • Pricing
  • Changelog

Build

  • Get started
  • Accessibility
  • Trip hologram

Templates

  • Command center
  • Fleet
  • Field service

New pieces by email. A short note when a release lands.

One email per release. Unsubscribe any time.

© 2026 High Command Pro licenseTermsPrivacyRefundsMap data © OpenStreetMap contributors · OpenFreeMap
Library/Map

Map

MapLibre map provider (useCommandMap) that follows the theme, draws status-ring clusters on demand and runs one hover-card system for every layer.

Free · MITComponent@highcommand/map4 files
See it in context
Customize

Installation

$ npx shadcn@latest add @highcommand/map

Copies the source into your project and pulls in what it needs (5 other items). First time? Add the registry to components.json.

Props

<CommandMap />

High Command's map canvas on MapLibre.

PropTypeDefault
labelrequiredstring—

Accessible name of the map region.

providerBasemapProvider—

Where the tiles come from. Default OpenFreeMap (free, keyless, worldwide).

operationalbooleantrue

The operational tone: curated place labels instead of the tiles' own, quiet roads at low zoom. Default true.

themeTheme—

Force a theme; default follows <html data-theme>, else the OS.

glyphsUrlstring—

Glyph server override (must serve `fonts`).

fontsBasemapFontsFONTS

Font stacks the layers use; default matches the default glyph server.

centerLngLat[-96, 38]

Opening camera.

zoomnumber3.4

Opening zoom (default 3.4).

boundsLngLatBoundsLike—

Opening view as a box, used instead of `center`/`zoom` on the first camera only (a theme switch keeps the camera it had).

minZoomnumber1.5

Lowest zoom the person can reach (default 1.5); changing it rebuilds the map.

maxZoomnumber17

Highest zoom the person can reach (default 17); changing it rebuilds the map.

controlsbooleantrue

Zoom buttons, top right. Default true.

cardsbooleantrue

Hover cards for the layers' objects. Default true.

onMap(map: MlMap) => void—

Called with each new map (one per theme).

classNamestring—

Extra classes on the map's root element (`hq-map`).

styleCSSProperties—

Inline style on the map's root element; give it a height, the map fills it.

childrenReactNode—

Layer components (they read the map from useCommandMap and draw once it is loaded) and any overlay.

Also in this item 13

<CardShell />6 propsThe one card, placed beside its object (right of it, or left where the right has no room) and kept inside the map.
PropTypeDefault
krequiredstring | null—

What the card is about (an object key); a new value fades the new content in as the card glides, null fades the card out.

atrequired{ x: number; y: number } | null—

The object's point on the map in CSS px, or null for no card.

Wrequirednumber—

Width of the map in CSS px, to keep the card inside it.

Hrequirednumber—

Height of the map in CSS px, to keep the card inside it.

childrenrequiredReactNode—

The card's content (ShipCard, OwnCard and the like).

commitRef{ current: (() => void) | null }—

Set by the shell: expand the card into the panel that is opening (a click committed to it).

<Head />4 propsThe card's head: status dot, identity, what kind of thing, and its state in words.
PropTypeDefault
colorrequiredStatusColor—

Status colour of the dot and the state word.

idrequiredReactNode—

The identity, in bold mono (a reference, a unit number).

kindReactNode—

What kind of thing it is, after the identity.

statestring—

Its state in words, at the right in the status colour.

<Od />2 propsOrigin to destination.
PropTypeDefault
arequiredstring—

Origin.

brequiredstring—

Destination.

<Figs />1 propsThree to five key figures: label, value, optional status colour.
PropTypeDefault
itemsrequired[string, ReactNode, StatusColor?][]—

One `[label, value, status colour?]` per figure; the label also keys the row, so keep labels unique.

<Hint />1 propsWhat a click does.
PropTypeDefault
childrenrequiredReactNode—

The hint text.

<ShipCard />15 propsThe hover card for a shipment (see ShipCardProps).
PropTypeDefault
referencerequiredstring—

The shipment's reference, shown as the card's identity.

moderequiredstring—

Its mode ("ftl", "air"...), shown upper-cased beside the reference.

colorrequiredStatusColor—

Status colour of the dot and the state word.

originrequiredstring—

Where it started, by name.

destinationrequiredstring—

Where it is going, by name.

statestring—

Its state in words (default the status colour's word).

accountstring | null—

The customer account, in the meta line.

carrierstring | null—

The carrier, in the meta line after the account.

etastring | null—

ISO time.

confidencestring | null—

"high", "medium" or "low" (any case); shown as High, Med or Low, other text as given.

progressnumber | null—

0..1 of the way.

offRouteMnumber | null—

Metres off its planned road (the dotted line is the way it has come).

reasonstring | null—

Why it is off plan, in a line under the figures.

timeZonestring—

IANA zone for the ETA.

touchboolean—

True on touch screens: the hint reads "Tap again" instead of "Click".

<OwnCard />10 propsThe hover card for one of your own vehicles (see OwnCardProps).
PropTypeDefault
unitrequiredstring—

The vehicle's unit number, shown as the card's identity.

kindrequiredstring—

`cargo_van`, `box_truck` or `tractor` (shown as Van, Box truck, Tractor; other text as given).

colorrequiredStatusColor—

Status colour of the dot and the state word.

routestring | null—

Today's route code; null or omitted shows "No route today".

driverstring | null—

The driver's name, after the route code.

stopsDonenumber0

Stops finished (default 0).

stopsTotalnumber0

Stops on the route (default 0; 0 shows a dash).

delayMinnumber | nullnull

Minutes against plan (null: unknown or not on a route).

carriesnumber0

How many shipments it carries (default 0).

touchboolean—

True on touch screens: the hint reads "Tap again" instead of "Click".

<LaneCard />5 propsA lane: its two ends by name, modes, volume, how many late and at risk, carriers.
PropTypeDefault
lanerequiredPick<Lane, 'color' | 'modes' | 'n' | 'counts'>—

The lane: its status colour, modes, shipment count and counts per status.

fromrequiredstring—

Name of the lane's origin end.

torequiredstring—

Name of the lane's destination end.

carriersnumber—

How many carriers run it; omit to leave the figure out.

touchboolean—

True on touch screens: the hint reads "Tap again" instead of "Click".

<ClusterCard />6 propsA cluster's members, worst first: about six, then how many more (a click zooms in to split them).
PropTypeDefault
nrequirednumber—

How many things the cluster holds, the card's identity.

countsrequiredRecord<StatusColor, number> | null—

Members per status for the split line; null leaves it out (the head colour then follows the first member).

membersrequiredClusterMember[] | null—

The member rows, worst first; null while they load.

ownboolean—

True for your own vehicles: the hint offers to list them instead of zooming in.

nounstring—

What the cluster holds ("shipments here", "vehicles here").

touchboolean—

True on touch screens: the hint reads "Tap again" instead of "Click".

<Split />2 propsA line of status counts, worst first, each with its dot and word; statuses with a zero count are left out.
PropTypeDefault
countsrequiredRecord<StatusColor, number>—

How many per status.

labelsRecord<StatusColor, string>STATUS_LABEL

The word for each status (default STATUS_LABEL).

<SiteCard />4 propsThe hover card for one of your sites (a DC): what is due in, waiting to leave, late and in exception.
PropTypeDefault
namerequiredstring—

The site's name, the card's identity.

factsrequiredSiteFacts—

Counts of what it has coming and going.

cityNamestring | null—

The city it is in, under the head.

touchboolean—

True on touch screens: the hint reads "Tap again" instead of "Click".

<MarkCard />3 propsThe hover card for a "needs attention" mark on the map.
PropTypeDefault
labelrequiredstring—

What needs attention, in a line under the head.

colorrequiredStatusColor—

Status colour of the head's dot.

touchboolean—

True on touch screens: the hint reads "Tap again" instead of "Click".

<VehicleCard />13 propsThe hover card for a Fleet map vehicle (see VehicleCardProps).
PropTypeDefault
unitrequiredstring—

The vehicle's unit number, shown as the card's identity.

kindrequiredstring—

`cargo_van`, `box_truck` or `tractor` (shown as Van, Box truck, Tractor; other text as given).

colorrequiredStatusColor—

Status colour of the dot and the state word.

staterequiredstring—

Its state in words.

driverstring | null—

The driver's name; null or omitted shows "No driver".

routestring | null—

Today's route code, after the driver.

stopsDonenumber0

Stops finished (default 0).

stopsTotalnumber0

Stops on the route (default 0; the figure shows a dash with no route or no stops).

delayMinnumber | nullnull

Minutes against plan (null: unknown).

speedKmhnumber | nullnull

Speed in km/h, rounded; null (the default) shows a dash.

atstring | null—

ISO time of the last fix; the card shows its age against `now`.

trackerOfflineboolean—

True adds "Tracker offline" to the card.

nowstring—

"Now" (ISO) for the fix's age.

Helpers24 exported functions
  • useCommandTheme(): Theme

    High Command's theme: `data-theme` on <html>, else the OS setting; dark on the server (High Command is dark-first).

  • framePoints(map: Map$1, pts: readonly { lat: number; lng: number; }[], opts?: { padding?: number | { top: number; bottom: number; left: number; right: number; } | undefined; maxZoom?: number | undefined; animate?: boolean | undefi…

    Frame points the short way round the globe, easing in unless motion is reduced. A small screen cannot hold a global network: when the box would need a zoom under the map's minimum, it frames where most of it is (within 2,500 km of its middle) instead.

  • removeAll(map: Map$1, layers: string[], sources?: string[], images?: string[]): void

    Remove layers, sources and images a layer component added (a theme switch or unmount may already have taken the map).

  • useLatest<T>(value: T): RefObject<T>

    The latest value, for map handlers and frame loops made once (updated after each render).

  • cssVar(n: string, fallback?: string): string

    A colour token as the page has it now; before the stylesheet is in, the dark theme's value from tokens.ts, never a hex of its own.

  • rgba(hex: string, a: number): string

    `#rrggbb` as `rgba(r,g,b,a)` for MapLibre paint; anything that is not a 6-digit hex comes back unchanged.

  • slotId(s: "heat" | "contours" | "paths" | "lanes" | "route" | "places" | "sites" | "clusters" | "trails" | "own" | "markers" | "trace"): string

    The MapLibre layer id of a slot's marker (`hq-slot-<slot>`); a layer inserts its own layers just under it.

  • useCommandMap(): CommandMapContext

    The map, whether it has loaded, the theme and its colours, and the hover system. Use inside <CommandMap>.

  • addAt(map: Map$1, slot: "heat" | "contours" | "paths" | "lanes" | "route" | "places" | "sites" | "clusters" | "trails" | "own" | "markers" | "trace", layer: AddLayerObject): Map$1

    Add a layer at its slot's depth (just under the slot's marker).

  • waterLayer(map: Map$1): string | undefined

    The basemap's first water layer: the land texture and the dot lens go under it, so only land shows them.

  • useLayerId(): string

    A prefix for one layer component's MapLibre ids, so two of them on one map never collide.

  • glyphOfMode(mode: string, leg?: number | undefined, legs?: number | undefined): GlyphKey

    The glyph for a shipment's mode. Modes arrive as "ftl", "ocean+ltl", "Parcel", "Air" (any case); a multi-mode shipment shows the mode of the leg it is on (`leg`, when its path has one point per leg end), else its first, long-haul mode.

  • canvas(cssW: number, cssH?: number): { ctx: CanvasRenderingContext2D; done: () => Img; }

    A 2D canvas of cssW x cssH CSS px (cssH defaults to cssW) drawn at 2x; `done()` returns its pixels as an Img for map.addImage.

  • glyphPath(ctx: CanvasRenderingContext2D | Path2D, key: GlyphKey): void

    Adds the outline of a carrier glyph (truck, parcel, ship, plane), centred on 0,0 and about 14 px across, to a canvas context or Path2D.

  • badgePath(ctx: CanvasRenderingContext2D | Path2D, shape: BadgeShape, x: number, y: number, r: number): void

    The status shape (as on every status dot: at risk triangle, late diamond, blocked square; on track has none, neutral is a hollow ring) centred on (x, y), with a panel-coloured outline so it reads on top of a ring or a glyph. Colour is never the only cue.

  • drawBadge(ctx: CanvasRenderingContext2D, shape: BadgeShape, x: number, y: number, r: number, color: string, panel: string): void

    Draws the status shape at (x, y) with radius r in `color` and a `panel`-coloured outline; draws nothing for on_track.

  • drawChip(key: GlyphKey, ring: string, fill: string, status?: BadgeShape): Img

    A round chip: panel-coloured disc, status-coloured ring, status-coloured glyph, and the status's shape as a badge at the top right (none for on track). A shipment that is not moving gets a dashed ring.

  • drawOwn(ring: string, fill: string, status?: BadgeShape): Img

    One of the tenant's own vehicles (Fleet): a rounded square with the truck glyph, calm (the panel colour, a quiet outline), so it reads apart from the round carrier chips; the status shape only when the vehicle's route needs attention. `kind` picks a van, a box truck or a tractor outline width; the shape is the same.

  • drawOwnStack(ring: string, fill: string, status?: BadgeShape): Img

    Several of our own vehicles in one place (a depot): two stacked rounded squares, the count drawn over the front one by the map, in the same quiet outline as one vehicle; a status badge only when one of them needs attention. Never a ring: rings are shipment clusters.

  • drawSite(stroke: string, fill: string): Img

    Our DC: a squared hub mark (never a status colour) — outer square, inner solid core.

  • drawPlace(kind: PlaceGlyph, stroke: string, fill: string): Img

    Reference-place marks, all neutral: a dot for a city, a diamond for a port, a small plane for an air-cargo hub.

  • drawRing(size: "s" | "m" | "l" | "x", parts: number[], colors: string[], fill: string, track: string, worst?: { shape: BadgeShape; color: string; } | undefined): Img

    A cluster as a ring chart: the ring is split by status (exceptions first, clockwise from 12 o'clock), the centre carries the count (drawn by the symbol's text). `parts` are step counts out of RING_STEPS in STATUS order; any part > 0 gets at least one step.

  • drawChevron(kind?: "single" | "double" | "bar"): Img

    A chevron pointing along +x, drawn white for SDF tinting: shows a lane's direction of travel without motion. `kind` makes the lane's status readable without its colour: at risk one chevron, late two, blocked a chevron against a bar.

  • drawMark(color: string, panel: string, status: BadgeShape): Img

    A queue item on the map (the exception lens): its status shape alone (late diamond, at risk triangle, neutral hollow ring) in the status colour, ringed in the panel colour so it reads on any basemap. Never a chip: chips are shipments.

Dependencies

npm
maplibre-gllucide-react
Builds on
ThemeUI primitivesShared helpersBasemap styleMap geometry
Used by
Shipment layerFleet map layersCurated place labels and sitesRoute traceMap key, filters and paddingGeofence layerService ringsDensity heatmap
Pro pieces built on this
Land texture and dot lens ProException heatmap and risk contours ProLane arcs ProOwn fleet layer ProEdge chips ProMap kit ProCommand center ProFleet ProGeofence draw Pro

Install this free piece now; the Pro pieces drop in on top of it, in the same app. Pro is $79 once.

PreviousMap geometryNext Land texture and dot lens

On this page

PreviewInstallationPropsDependencies