talira

Free, customisable map components for React, built on MapLibre GL and styled like shadcn/ui

open sourceMITfree

mapcn is a set of free, open source map components for React, built on MapLibre GL, styled with Tailwind and following shadcn/ui's patterns, added to a project with one command. The components are theme-aware (light and dark), composable and give full access to MapLibre underneath: markers with popups, tooltips and labels, routes and paths, and zoom, compass, locate and fullscreen controls. It also publishes an agent skill that teaches coding agents to use it. Its default styles use CARTO basemaps from OpenStreetMap data, and it works with any MapLibre-compatible basemap provider.

Problems it solves

  • add an interactive map to my shadcn/ui React app that matches its styling
  • free map components for React without a Mapbox token
  • show markers with popups and a route on a map in a Next.js app

Features

  • React map components on MapLibre GL, styled with Tailwind
  • follows shadcn/ui's patterns and adapts to light and dark mode
  • markers with popups, tooltips and labels
  • routes, paths and map controls
  • an agent skill for coding agents

Limitations

  • Its default CARTO basemaps are free only up to monthly tile limits (1 million requests for commercial use)1
  • CARTO basemaps need CARTO and OpenStreetMap attribution, and production apps may need their own provider or API key1

Alternatives

The same job

These do what mapcn does.

  1. Leaflet The leading open-source JavaScript library for interactive maps
  2. MapLibre GL JS Open-source TypeScript library for interactive vector tile maps in the browser
  3. OpenLayers High-performance JavaScript library for interactive web maps

Compare mapcn with the top 3