Radar
97.14% coveredAnimated radar sweep signal overlay on map coordinates.
Installation
First, make sure you have the base map component installed:
npx shadcn@latest add https://www.terrae.dev/map.jsonThen install the radar component:
npx shadcn@latest add https://www.terrae.dev/radar.jsonCustom Colors
Use color, gridColor, and backgroundColor to theme each radar independently.
Sweep Speed
Control the rotation speed with duration. Lower values create a faster sweep, higher values create a slower, more deliberate rotation.
Range Rings
Set rings to control the number of concentric range rings displayed on the radar.
No Crosshairs
Set showCrosshairs to false to hide the horizontal and vertical crosshair lines for a cleaner look.
Properties
| Prop | Type | Description |
|---|---|---|
coordinates | [number, number] | Position [longitude, latitude] for the radar center. |
size | number | Radar diameter in pixels. |
color | string | Primary color for the sweep line, center dot, and outer ring. |
gridColor | string | Color of the concentric rings and crosshair lines. |
backgroundColor | string | Background fill color of the radar circle. |
duration | number | Time in milliseconds for one full sweep rotation. |
rings | number | Number of concentric range rings. |
showCrosshairs | boolean | Show the horizontal and vertical crosshair lines. |
pitchAlignmentNew | "map" | "viewport" | "auto" | Controls how the radar is aligned when the map is pitched. Use "viewport" to keep the radar facing the screen. |
Performance Considerations
- The radar uses CSS animations and SVG — lightweight and GPU-accelerated
- Multiple radars on screen have minimal performance impact
- Animation automatically stops when the component unmounts