BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/thegridcn/coordinate-display

Coordinate Display

thegridcn/coordinate-display
FreeComponent

thegridcn publishes no description for this item.

See it running

Open the demo on thegridcn

thegridcn.com/r/coordinate-display
Open
This registry sends X-Frame-Options, so its page cannot be embedded here. The link is the same page the frame would have shown.

Install it

npx shadcn@latest add https://thegridcn.com/r/coordinate-display.json

Source

src/components/thegridcn/coordinate-display.tsxthegridcn.com/r/coordinate-display.json
1"use client";
2
3import type * as React from "react";
4import { cn } from "@/lib/utils";
5
6interface CoordinateDisplayProps extends React.HTMLAttributes<HTMLDivElement> {
7 bearing?: string;
8 heading?: number;
9 label?: string;
10 latitude?: string;
11 longitude?: string;
12}
13
14export function CoordinateDisplay({
15 heading = 0,
16 bearing = "NE",
17 latitude,
18 longitude,
19 label,
20 className,
21 ...props
22}: CoordinateDisplayProps) {
23 return (
24 <div
25 className={cn(
26 "inline-flex flex-col items-end font-mono text-sm",
27 className
28 )}
29 {...props}
30 >
31 {/* Heading */}
32 <div className="flex items-baseline gap-1">
33 <span className="font-bold text-lg text-primary">{heading}°</span>
34 <span className="text-foreground/80 text-xs">{`${String(Math.floor(Math.random() * 200)).padStart(3, "0")}`}</span>
35 <span className="font-bold text-primary">{bearing}</span>
36 </div>
37
38 {/* Lat/Long */}
39 {latitude || longitude ? (
40 <div className="text-[10px] text-foreground/80 uppercase tracking-widest">
41 {latitude ? <span>LAT {latitude}</span> : null}
42 {latitude ? longitude && <span> · </span> : null}
43 {longitude ? <span>LNG {longitude}</span> : null}
44 </div>
45 ) : null}
46
47 {/* Label */}
48 {label ? (
49 <div className="text-[10px] text-foreground/80 uppercase tracking-widest">
50 {label}
51 </div>
52 ) : null}
53 </div>
54 );
55}

Files it writes

  • src/components/thegridcn/coordinate-display.tsx

Facts

Registry
thegridcn
Type
registry:component
Access
Free
Files written
1
Licence
the repository states none
First indexed
2026-08-02
Last confirmed
today

Go to the source

Docs on thegridcn thegridcn.com Raw registry item This item as JSON

More from thegridcn

All 139 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
AccordionaccordionthegridcnComponentsFree2 deps
Agent Avataragent-avatarthegridcnComponentsFreeno deps
AlertalertthegridcnComponentsFree1 dep
Alert Dialogalert-dialogthegridcnComponentsFree1 dep
Announcement Barannouncement-barthegridcnComponentsFreeno deps
Anomaly Banneranomaly-bannerthegridcnComponentsFreeno deps
Arrival Panelarrival-panelthegridcnComponentsFreeno deps
Aspect Ratioaspect-ratiothegridcnComponentsFree1 dep
BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex