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

Embedding Map

ProNew

Explore a two-dimensional embedding with a gliding crosshair and an inspector for the selected point.

Installation

pnpm dlx shadcn@latest add @viewport/embedding-map

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
points*Point[]

Points projected into the unit square, with the origin at the lower left.

—
onSelect(point: Point) => void

Called with the selected projected point.

—

Accessibility

  • Each point is a keyboard-accessible button with its own label. Coordinates are repeated in text.