Embedding Map
ProNewExplore 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
| Prop | Type | Default |
|---|---|---|
| points* | Point[]Points projected into the unit square, with the origin at the lower left. | — |
| onSelect | (point: Point) => voidCalled with the selected projected point. | — |
Accessibility
- Each point is a keyboard-accessible button with its own label. Coordinates are repeated in text.