BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/mapcn/store-locator

Store Locator

mapcn/store-locator
FreeBlock

Searchable store list synced with map markers.

Install it

npx shadcn@latest add https://mapcn.dev/r/store-locator.json

Source

src/registry/blocks/store-locator/page.tsxmapcn.dev/r/store-locator.json
1"use client";
2
3import { useMemo, useState, type CSSProperties } from "react";
4
5import { SidebarInset, SidebarProvider } from "@/components/ui/sidebar";
6import { StoreList } from "./components/store-list";
7import { LocatorMap } from "./components/locator-map";
8import { MAP_CENTER, stores } from "./data";
9
10export default function Page() {
11 const [query, setQuery] = useState("");
12 const [selectedId, setSelectedId] = useState<string | null>(stores[0].id);
13
14 const filtered = useMemo(() => {
15 const q = query.trim().toLowerCase();
16 if (!q) return stores;
17 return stores.filter(
18 (store) =>
19 store.name.toLowerCase().includes(q) ||
20 store.address.toLowerCase().includes(q) ||
21 store.neighborhood.toLowerCase().includes(q),
22 );
23 }, [query]);
24
25 return (
26 <SidebarProvider style={{ "--sidebar-width": "20rem" } as CSSProperties}>
27 <StoreList
28 stores={filtered}
29 query={query}
30 onQueryChange={setQuery}
31 selectedId={selectedId}
32 onSelect={setSelectedId}
33 />
34
35 <SidebarInset>
36 <LocatorMap
37 stores={filtered}
38 selectedId={selectedId}
39 onSelect={setSelectedId}
40 onClearSelection={() => setSelectedId(null)}
41 center={MAP_CENTER}
42 />
43 </SidebarInset>
44 </SidebarProvider>
45 );
46}

What it pulls in

npm packages

  • lucide-react

Other registry items

  • @mapcn/map
  • input
  • sidebar

Files it writes

  • src/registry/blocks/store-locator/page.tsx
  • src/registry/blocks/store-locator/data.ts
  • src/registry/blocks/store-locator/components/store-list.tsx
  • src/registry/blocks/store-locator/components/locator-map.tsx

Facts

Registry
mapcn
Type
registry:block
Access
Free
Files written
4
Licence
MIT
First indexed
2026-08-01
Last confirmed
today

Go to the source

mapcn.dev AnmolSaini16/mapcn on GitHub Raw registry item This item as JSON

More from mapcn

All 9 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
Analytics Cardanalytics-cardmapcnBlocksFree1 dep · 2 files
Analytics Mapanalytics-mapmapcnBlocksFree2 deps · 4 files
ChoroplethchoroplethmapcnBlocksFree2 deps · 3 files
Delivery Trackerdelivery-trackermapcnBlocksFree1 dep · 2 files
HeatmapheatmapmapcnBlocksFreeno deps
Logistics Networklogistics-networkmapcnBlocksFree1 dep · 4 files
Uptime Monitoruptime-monitormapcnBlocksFree1 dep · 4 files
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