Open-source project
AnmolSaini16/mapcn avatar
AnmolSaini16/mapcn

mapcn puts MapLibre map components into shadcn/ui projects, but its free default tiles belong to CARTO

Beautiful map components. 100% Free, Zero config, one command setup.

12,407 stars723 forksTypeScriptMIT

At a glance

What is it?
mapcn is an MIT-licensed set of React map components built on MapLibre GL, styled with Tailwind and distributed through a shadcn registry. The components themselves cost nothing; the CARTO basemaps they use by default come with monthly request caps, attribution rules and possible API key requirements that production apps have to plan for.
Who is it for?
mapcn fits React teams already using shadcn/ui and Tailwind who want markers, popups, routes and map controls that match the rest of their interface without wiring MapLibre by hand. It does not fit non-React stacks, and it is not a complete free mapping service: the default CARTO basemaps cap commercial use at 1 million tile requests a month and require visible attribution.
Can I use it commercially?
Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 10 days ago.
What is it written in?
Mainly TypeScript, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on November 25, 2026, and from our analysis. They are not legal advice.

From daily snapshots

Star history

  • AnmolSaini16/mapcn12,407 ★ · +304
Star history
Repository2026-09-222026-11-25
AnmolSaini16/mapcn12.1k12.4k

304 Stars in the last 64 days, measured from the daily GitHub snapshot. Compare with other projects

Editorial analysis

Components ship from a shadcn registry build, not from an npm release

mapcn is not published as a versioned library. The repository's package.json is marked private with version 0.1.0, and the repository is a Next.js site that also produces the component registry. Its registry:build script runs npx shadcn build -o ./public/r, then a script that fixes registry imports, then the skill build. The root holds registry.json and components.json, which are the files that shape what the shadcn tooling serves.

The practical consequence is that the installation steps live on mapcn.dev/docs/installation rather than in an npm install line, and the components follow shadcn/ui patterns and styling conventions. The repository also has no GitHub releases, so there is no tagged changelog to compare against. Anyone who wants to know what changed has to read the commit history on main, where the last push was on 2026-10-31.

MapLibre GL 6 underneath, React 19 and Tailwind 4 on top

The rendering engine is MapLibre GL; package.json pins maplibre-gl at ^6.3.0. The surrounding stack is React and React DOM 19.2.3, Next.js ^16.2.7, Tailwind CSS 4 through @tailwindcss/postcss, radix-ui ^1.6.0 and lucide-react for icons. The project's promise is full access to MapLibre's mapping capabilities while you build the interface from declarative components.

Those components cover a defined set of jobs. There is a marker system with popups, tooltips and labels. Routes draw paths on the map. Controls provide zoom, compass, locate and fullscreen. The components are theme-aware and adapt to light and dark mode automatically, which is what makes them sit comfortably next to shadcn/ui buttons and cards. Anything beyond that list means dropping down to MapLibre itself, which mapcn exposes rather than hides.

The components are React only

mapcn describes itself as map components for React, and everything in the repository assumes a React app styled with Tailwind and arranged in shadcn/ui conventions. The dependency list is React 19, Next.js and Radix, with nothing aimed at other frameworks.

For a reader on Vue, Svelte, Flutter or React Native, that means mapcn does not plug in. You could still use MapLibre GL directly and borrow ideas from the source, but the zero-config promise only holds inside a React project that already uses Tailwind. Teams on React without shadcn/ui will also be adopting its patterns along with the maps, since the components are built to match them. If your design system follows different conventions, expect to restyle rather than drop the components in untouched.

Default tiles come from CARTO, and the free tier stops at a monthly ceiling

Zero config works because mapcn ships with default styles that point at CARTO Basemaps, which are built on OpenStreetMap data. The components are free under MIT. The map tiles are a separate service with its own limits.

CARTO's free tier covers commercial use up to 1 million tile requests per month and non-commercial use up to 5 million tile requests per month. Every pan and zoom by every visitor consumes tile requests, so the number to estimate is your traffic multiplied by how much people move around the map, not how many maps you render. A demo or internal tool may never come close. A public product with heavy map use can cross the commercial ceiling, and at that point you are dealing with CARTO's terms, not mapcn's license.

Attribution must stay visible and API keys may be required later

Two more CARTO conditions carry over into your app. CARTO and OpenStreetMap attribution must remain visible on the map, so a design that hides the attribution line to clean up the interface breaks the terms. And CARTO requires API keys for raster basemaps and says it may extend that requirement to vector basemaps.

That second point is the one to watch. A map that works today with no key could need one later if CARTO changes its vector policy, and an app that never planned for key management would then need configuration work before tiles load again. For production, mapcn's own advice is to review CARTO's legal basemap terms and configure your own basemap provider or API key. Because mapcn sits on MapLibre, it accepts alternative MapLibre-compatible basemap providers, so switching away from CARTO does not mean abandoning the components.

An agent skill teaches coding agents where a map would fit

mapcn ships a skill so coding agents such as Claude Code, Cursor and Codex know how to use the components:

bash
npx skills add AnmolSaini16/mapcn

After that you can ask the agent for a map, or ask where one would fit in your app. The skill is generated rather than hand-maintained: the skill:build script runs scripts/build-skill.ts, and registry:build calls it at the end, so the skill is rebuilt whenever the registry is. The repository also carries a skills/ directory, a .claude/ folder and an AGENTS.md file. The skill does not change the basemap terms. An agent that drops a map into a production page is still using CARTO's default tiles unless you have configured another provider, so the request limits and attribution rules follow the map wherever the agent puts it.

Contributions go through a fork and the project runs on sponsors

Development is open to pull requests through the standard flow: fork, create a feature branch, commit, push and open a pull request. The repository uses ESLint 9 with eslint-config-next, Prettier with the Tailwind plugin, and TypeScript 5. A blocks:thumbnails script uses Playwright to capture block thumbnails for the site.

mapcn is free and open source and is kept going by its sponsors, with a sponsor page at mapcn.dev/sponsors. That funding model, combined with a 0.1.0 version and no tagged releases, tells you how to treat it: a young, actively pushed project whose components you copy into your own codebase. Once the code is in your project you can fix or adapt it yourself, but upstream changes reach you only when you pull them again from the registry.

Editorial conclusion

mapcn fits React teams already using shadcn/ui and Tailwind who want markers, popups, routes and map controls that match the rest of their interface without wiring MapLibre by hand. It does not fit non-React stacks, and it is not a complete free mapping service: the default CARTO basemaps cap commercial use at 1 million tile requests a month and require visible attribution. Before shipping, check your expected tile volume against CARTO's terms and decide whether to configure your own basemap provider or key.

Frequently asked questions

Is mapcn free?

The mapcn components are free and open source under the MIT license. The default CARTO basemaps are free up to 1 million tile requests a month for commercial use and 5 million for non-commercial use.

Can I use OpenStreetMap tiles for free with mapcn?

mapcn's default styles use CARTO Basemaps built on OpenStreetMap data, free within CARTO's monthly tile limits. CARTO and OpenStreetMap attribution must stay visible, and CARTO requires API keys for raster basemaps.

Can mapcn use a basemap provider other than CARTO?

Yes. mapcn is built on MapLibre and supports alternative MapLibre-compatible basemap providers, and it advises configuring your own provider or API key for production.

Official sources

  1. AnmolSaini16/mapcn on GitHub
  2. Issues
  3. License: MIT
  4. Project website
  5. README
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/anmolsaini16-mapcn.svg)](https://hysenlabs.com/projects/anmolsaini16-mapcn)

Star history chart for your README

markdown
[![Star history](https://hysenlabs.com/chart/anmolsaini16-mapcn.svg)](https://hysenlabs.com/projects/anmolsaini16-mapcn)

Was this useful?