Beautiful map components. 100% Free, Zero config, one command setup.
TypeScript
Update Layout and typography
Anmoldeep Singh1e026119679e
diff --git a/src/app/(home)/_components/examples.tsx b/src/app/(home)/_components/examples.tsxindex b8f1cc9..28513bb 100644--- a/src/app/(home)/_components/examples.tsx+++ b/src/app/(home)/_components/examples.tsx@@ -10,7 +10,7 @@ import {MarkerTooltip,MapRoute,} from "@/registry/map";-import { Truck, Flame, TrendingUp, Zap, Coffee } from "lucide-react";+import { Truck, Flame, TrendingUp, Zap } from "lucide-react";import { cn } from "@/lib/utils";const analyticsData = [@@ -60,11 +60,11 @@ export function Examples() {} | null>(null);return (- <div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3 animate-fade-in delay-400">- {/* Widget 1: Analytics - spans 2 cols, 2 rows */}+ <div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4 animate-fade-in delay-400">+ {/* Widget 1: Analytics */}<ExampleCard- label="Analytics Dashboard"- className="col-span-1 sm:col-span-2 sm:row-span-2 h-[300px] sm:h-[432px]"+ label="Analytics"+ className="sm:col-span-2 aspect-2/1"delay="delay-400">{/* Stats Panel */}@@ -72,7 +72,7 @@ export function Examples() {<div className="text-[10px] text-muted-foreground uppercase tracking-wider mb-1">Active Users</div>- <div className="text-2xl font-bold leading-tight">2,847</div>+ <div className="text-2xl font-semibold leading-tight">2,847</div><div className="flex items-center gap-1 mt-1"><TrendingUp className="size-3 text-emerald-500" /><span className="text-xs text-emerald-500">+12.5%</span>@@ -127,7 +127,9 @@ export function Examples() {<MarkerTooltip><div className="text-center"><div className="font-medium">{loc.city}</div>- <div className="text-emerald-500 font-bold">{loc.users}</div>+ <div className="text-emerald-500 font-semibold">+ {loc.users}+ </div><div className="text-[10px] text-muted-foreground">active users</div>@@ -138,105 +140,8 @@ export function Examples() {</Map></ExampleCard>- {/* Widget 2: EV Charging */}- <ExampleCard label="EV Charging" className="h-[208px]" delay="delay-500">- <Map center={[-122.425, 37.777]} zoom={11.5}>- <MapMarker longitude={-122.4194} latitude={37.7749}>- <MarkerContent>- <div className="bg-emerald-500 rounded-full p-1.5 shadow-lg shadow-emerald-500/30">- <Zap className="size-3 text-white fill-white" />- </div>- </MarkerContent>- <MarkerTooltip>- <div className="text-xs space-y-0.5">- <div className="font-medium">Market St Station</div>- <div className="flex items-center gap-1">- <span className="size-1.5 rounded-full bg-emerald-500" />- <span className="text-emerald-500">Available</span>- </div>- <div className="text-muted-foreground">150 kW • $0.35/kWh</div>- </div>- </MarkerTooltip>- </MapMarker>-- <MapMarker longitude={-122.4094} latitude={37.7849}>- <MarkerContent>- <div className="bg-emerald-500 rounded-full p-1.5 shadow-lg shadow-emerald-500/30">- <Zap className="size-3 text-white fill-white" />- </div>- </MarkerContent>- <MarkerTooltip>- <div className="text-xs space-y-0.5">- <div className="font-medium">Union Square</div>- <div className="flex items-center gap-1">- <span className="size-1.5 rounded-full bg-emerald-500" />- <span className="text-emerald-500">2 Available</span>- </div>- <div className="text-muted-foreground">50 kW • $0.28/kWh</div>- </div>- </MarkerTooltip>- </MapMarker>-- <MapMarker longitude={-122.4294} latitude={37.7689}>- <MarkerContent>- <div className="bg-amber-500 rounded-full p-1.5 shadow-lg shadow-amber-500/30">- <Zap className="size-3 text-white fill-white" />- </div>- </MarkerContent>- <MarkerTooltip>- <div className="text-xs space-y-0.5">- <div className="font-medium">Castro Station</div>- <div className="flex items-center gap-1">- <span className="size-1.5 rounded-full bg-amber-500" />- <span className="text-amber-500">In Use</span>- </div>- <div className="text-muted-foreground">~15 min remaining</div>- </div>- </MarkerTooltip>- </MapMarker>-- <MapMarker longitude={-122.4394} latitude={37.7809}>- <MarkerContent>- <div className="bg-zinc-400 rounded-full p-1.5 shadow-lg">- <Zap className="size-3 text-white fill-white" />- </div>- </MarkerContent>- <MarkerTooltip>- <div className="text-xs space-y-0.5">- <div className="font-medium">Hayes Valley</div>- <div className="flex items-center gap-1">- <span className="size-1.5 rounded-full bg-zinc-400" />- <span className="text-muted-foreground">Offline</span>- </div>- </div>- </MarkerTooltip>- </MapMarker>- </Map>- </ExampleCard>-- {/* Widget 3: Navigation */}- <ExampleCard label="Locate Me" className="h-[208px]" delay="delay-600">- <Map center={[77.5946, 12.9716]} zoom={10.5}>- <MapControls showZoom={false} showLocate onLocate={setUserLocation} />- {userLocation && (- <MapMarker- longitude={userLocation.longitude}- latitude={userLocation.latitude}- >- <MarkerContent>- <div className="relative flex items-center justify-center">- <div className="absolute size-5 rounded-full bg-blue-500/30 animate-ping" />- <div className="size-3 rounded-full bg-blue-500 border-2 border-white shadow-lg" />- </div>- </MarkerContent>- <MarkerTooltip>Your Location</MarkerTooltip>- </MapMarker>- )}- </Map>- </ExampleCard>-- {/* Widget 4: Delivery Tracking */}- <ExampleCard label="Delivery" className="h-[208px]" delay="delay-500">+ {/* Widget 2: Delivery */}+ <ExampleCard label="Delivery" className="aspect-square" delay="delay-500"><Map center={[-0.1076, 51.517]} zoom={11.2}><MapRoutecoordinates={[@@ -272,8 +177,8 @@ export function Examples() {</Map></ExampleCard>- {/* Widget 5: Trending Now */}- <ExampleCard label="Trending" className="h-[208px]" delay="delay-600">+ {/* Widget 3: Trending */}+ <ExampleCard label="Trending" className="aspect-square" delay="delay-600"><Map center={[-73.99, 40.735]} zoom={9.5}><MapMarker longitude={-73.9857} latitude={40.7484}><MarkerContent>@@ -336,61 +241,110 @@ export function Examples() {</Map></ExampleCard>- {/* Widget 6: Nearby Cafes */}- <ExampleCard label="Nearby" className="h-[208px]" delay="delay-700">- <Map center={[2.3522, 48.8566]} zoom={13}>- <MapMarker longitude={2.3522} latitude={48.8566}>+ {/* Widget 4: EV Charging */}+ <ExampleCard+ label="EV Charging"+ className="aspect-square"+ delay="delay-700"+ >+ <Map center={[-122.425, 37.777]} zoom={11.5}>+ <MapMarker longitude={-122.4194} latitude={37.7749}><MarkerContent>- <div className="bg-amber-700 rounded-full p-1.5 shadow-lg shadow-amber-700/30">- <Coffee className="size-3 text-white" />+ <div className="bg-emerald-500 rounded-full p-1.5 shadow-lg shadow-emerald-500/30">+ <Zap className="size-3 text-white fill-white" />+ </div>+ </MarkerContent>+ <MarkerTooltip>+ <div className="text-xs space-y-0.5">+ <div className="font-medium">Market St Station</div>+ <div className="flex items-center gap-1">+ <span className="size-1.5 rounded-full bg-emerald-500" />+ <span className="text-emerald-500">Available</span>+ </div>+ <div className="text-muted-foreground">150 kW • $0.35/kWh</div>+ </div>+ </MarkerTooltip>+ </MapMarker>++ <MapMarker longitude={-122.4094} latitude={37.7849}>+ <MarkerContent>+ <div className="bg-emerald-500 rounded-full p-1.5 shadow-lg shadow-emerald-500/30">+ <Zap className="size-3 text-white fill-white" /></div></MarkerContent><MarkerTooltip><div className="text-xs space-y-0.5">- <div className="font-medium">Café de Flore</div>+ <div className="font-medium">Union Square</div><div className="flex items-center gap-1">- <span className="text-amber-600">★ 4.8</span>- <span className="text-muted-foreground">• Open now</span>+ <span className="size-1.5 rounded-full bg-emerald-500" />+ <span className="text-emerald-500">2 Available</span></div>+ <div className="text-muted-foreground">50 kW • $0.28/kWh</div></div></MarkerTooltip></MapMarker>- <MapMarker longitude={2.3472} latitude={48.8606}>+ <MapMarker longitude={-122.4294} latitude={37.7689}><MarkerContent>- <div className="bg-amber-700 rounded-full p-1.5 shadow-lg shadow-amber-700/30">- <Coffee className="size-3 text-white" />+ <div className="bg-amber-500 rounded-full p-1.5 shadow-lg shadow-amber-500/30">+ <Zap className="size-3 text-white fill-white" /></div></MarkerContent><MarkerTooltip><div className="text-xs space-y-0.5">- <div className="font-medium">Les Deux Magots</div>+ <div className="font-medium">Castro Station</div><div className="flex items-center gap-1">- <span className="text-amber-600">★ 4.6</span>- <span className="text-muted-foreground">• Open now</span>+ <span className="size-1.5 rounded-full bg-amber-500" />+ <span className="text-amber-500">In Use</span></div>+ <div className="text-muted-foreground">~15 min remaining</div></div></MarkerTooltip></MapMarker>- <MapMarker longitude={2.3592} latitude={48.8526}>+ <MapMarker longitude={-122.4394} latitude={37.7809}><MarkerContent>- <div className="bg-amber-700 rounded-full p-1.5 shadow-lg shadow-amber-700/30">- <Coffee className="size-3 text-white" />+ <div className="bg-zinc-400 rounded-full p-1.5 shadow-lg">+ <Zap className="size-3 text-white fill-white" /></div></MarkerContent><MarkerTooltip><div className="text-xs space-y-0.5">- <div className="font-medium">Coutume Café</div>+ <div className="font-medium">Hayes Valley</div><div className="flex items-center gap-1">- <span className="text-amber-600">★ 4.7</span>- <span className="text-muted-foreground">• Closes 6pm</span>+ <span className="size-1.5 rounded-full bg-zinc-400" />+ <span className="text-muted-foreground">Offline</span></div></div></MarkerTooltip></MapMarker></Map></ExampleCard>++ {/* Widget 5: Locate Me */}+ <ExampleCard+ label="Locate Me"+ className="aspect-square"+ delay="delay-800"+ >+ <Map center={[77.5946, 12.9716]} zoom={10.5}>+ <MapControls showZoom={false} showLocate onLocate={setUserLocation} />+ {userLocation && (+ <MapMarker+ longitude={userLocation.longitude}+ latitude={userLocation.latitude}+ >+ <MarkerContent>+ <div className="relative flex items-center justify-center">+ <div className="absolute size-5 rounded-full bg-blue-500/30 animate-ping" />+ <div className="size-3 rounded-full bg-blue-500 border-2 border-white shadow-lg" />+ </div>+ </MarkerContent>+ <MarkerTooltip>Your Location</MarkerTooltip>+ </MapMarker>+ )}+ </Map>+ </ExampleCard></div>);}diff --git a/src/app/(home)/_components/hero.tsx b/src/app/(home)/_components/hero.tsxindex dd59695..91bee8a 100644--- a/src/app/(home)/_components/hero.tsx+++ b/src/app/(home)/_components/hero.tsx@@ -34,15 +34,14 @@ function CopyButton({ text }: { text: string }) {export function Hero() {return (- <div className="space-y-12">+ <div className="space-y-8"><div className="text-center space-y-4">- <h1 className="text-4xl sm:text-5xl md:text-6xl font-bold tracking-tight animate-fade-up">+ <h1 className="text-4xl sm:text-5xl md:text-6xl font-semibold tracking-tight animate-fade-up">Beautiful maps, made simple.</h1>- <p className="text-foreground/80 text-lg max-w-2xl mx-auto animate-fade-up delay-100">- Free & open source map components. Zero config, one command setup.- Built on MapLibre GL, styled with Tailwind, works seamlessly with- shadcn/ui.+ <p className="text-foreground/80 text-lg max-w-xl mx-auto animate-fade-up delay-100">+ Beautifully designed, Open source map components. Zero config. One+ command setup.</p></div>diff --git a/src/app/(home)/page.tsx b/src/app/(home)/page.tsxindex 0c3cc93..6453f40 100644--- a/src/app/(home)/page.tsx+++ b/src/app/(home)/page.tsx@@ -8,8 +8,8 @@ export default function Page() {<div className="min-h-screen bg-background flex flex-col overflow-x-hidden"><Header className="max-w-5xl mx-auto w-full" />- <main className="flex-1 px-6 py-16 mx-auto w-full">- <section className="max-w-5xl w-full mx-auto space-y-12">+ <main className="flex-1 px-6 py-20 mx-auto w-full">+ <section className="max-w-5xl w-full mx-auto space-y-20"><Hero /><Examples /></section>diff --git a/src/app/docs/_components/docs.tsx b/src/app/docs/_components/docs.tsxindex 2c21927..04d7e0b 100644--- a/src/app/docs/_components/docs.tsx+++ b/src/app/docs/_components/docs.tsx@@ -18,7 +18,7 @@ interface DocsHeaderProps {export function DocsHeader({ title, description }: DocsHeaderProps) {return (<div className="space-y-3">- <h1 className="text-3xl font-bold tracking-tight">{title}</h1>+ <h1 className="text-3xl font-semibold tracking-tight">{title}</h1><p className="text-lg text-muted-foreground leading-relaxed">{description}</p>diff --git a/src/app/docs/_components/examples/route-example.tsx b/src/app/docs/_components/examples/route-example.tsxindex 1210d25..3d6afc2 100644--- a/src/app/docs/_components/examples/route-example.tsx+++ b/src/app/docs/_components/examples/route-example.tsx@@ -29,7 +29,7 @@ export function RouteExample() {{stops.map((stop, index) => (<MapMarker key={stop.name} longitude={stop.lng} latitude={stop.lat}><MarkerContent>- <div className="size-4.5 rounded-full bg-blue-500 border-2 border-white shadow-lg flex items-center justify-center text-white text-xs font-bold">+ <div className="size-4.5 rounded-full bg-blue-500 border-2 border-white shadow-lg flex items-center justify-center text-white text-xs font-semibold">{index + 1}</div></MarkerContent>diff --git a/src/app/globals.css b/src/app/globals.cssindex 9084b82..0213332 100644--- a/src/app/globals.css+++ b/src/app/globals.css@@ -182,6 +182,7 @@.delay-500 { animation-delay: 500ms; }.delay-600 { animation-delay: 600ms; }.delay-700 { animation-delay: 700ms; }+.delay-800 { animation-delay: 800ms; }/* Shiki dual theme support for code blocks */html .shiki,diff --git a/src/app/layout.tsx b/src/app/layout.tsxindex 372b275..262b8c3 100644--- a/src/app/layout.tsx+++ b/src/app/layout.tsx@@ -1,19 +1,18 @@import type { Metadata } from "next";-import { Inter, JetBrains_Mono } from "next/font/google";+import { Geist, Geist_Mono } from "next/font/google";import { Analytics } from "@vercel/analytics/next";import { ThemeProvider } from "@/components/theme-provider";import "./globals.css";-const inter = Inter({+const geist = Geist({subsets: ["latin"],variable: "--font-sans",});-const jetbrainsMono = JetBrains_Mono({+const geistMono = Geist_Mono({subsets: ["latin"],variable: "--font-mono",- weight: ["400", "500"],});const siteUrl = process.env.NEXT_PUBLIC_SITE_URL || "http://localhost:3000";@@ -98,7 +97,7 @@ export default function RootLayout({return (<htmllang="en"- className={`${inter.variable} ${jetbrainsMono.variable}`}+ className={`${geist.variable} ${geistMono.variable}`}suppressHydrationWarning><body className="font-sans antialiased">diff --git a/src/app/not-found.tsx b/src/app/not-found.tsxindex d62a71d..92608de 100644--- a/src/app/not-found.tsx+++ b/src/app/not-found.tsx@@ -17,7 +17,9 @@ export default function NotFound() {</div><div className="space-y-2">- <h1 className="text-4xl font-bold tracking-tight">Lost on the map</h1>+ <h1 className="text-4xl font-semibold tracking-tight">+ Lost on the map+ </h1><p className="text-muted-foreground text-lg">The page you're looking for doesn't exist or has beenmoved.diff --git a/src/components/github-button.tsx b/src/components/github-button.tsxindex c52bc81..fcf92d1 100644--- a/src/components/github-button.tsx+++ b/src/components/github-button.tsx@@ -44,7 +44,9 @@ export async function StarCount() {return (<>{formattedCount && (- <span className="text-xs text-muted-foreground">{formattedCount}</span>+ <span className="text-xs text-muted-foreground tabular-nums">+ {formattedCount}+ </span>)}</>);