vue-maplibre
A simple library for Maplibre with vue 3 components, composition api and typescript support
425
4
| Install | |
|---|---|
npm install vue-maplibre |
|
| Latest Version: | 0.1.0 |
| Vue: | 3 |
| License: | MIT |
| Last Updated: | Jun 3, 2026 |
| Links: | GitHub · npm |
Maintainer: chatondearu
vue-maplibre
Vue 3 components and plugin helpers for building map interfaces with MapLibre GL.
Status
First public release 0.1.0 is prepared via Changesets.
Installation
pnpm add vue-maplibre maplibre-gl
maplibre-gl is required at runtime by the components.
Quickstart
// main.ts
import { createApp } from 'vue'
import VueMapLibre from 'vue-maplibre'
import App from './App.vue'
const app = createApp(App)
app.use(VueMapLibre, {
style: 'https://basemaps.cartocdn.com/gl/positron-gl-style/style.json',
i18n: false,
})
app.mount('#app')
<script setup lang="ts">
import { MapLibre } from 'vue-maplibre'
</script>
<template>
<MapLibre
:center="[10, 40]"
:zoom="5"
/>
</template>
Public API (current)
Plugin
- Default export:
VueMapLibre - Install signature:
app.use(VueMapLibre, { style, i18n? })
Component
MapLibre- Props:
center?: LngLatLikezoom?: numberminZoom?: numbermaxZoom?: numberbounds?: LngLatBoundsLikedoubleClickZoom?: booleanzoomControl?: booleani18n?: boolean
- Events:
readymovezoomendclick
- Props:
Environment notes
- Mapbox URL transformation uses
VITE_MAPBOX_TOKENwhen needed by your style URLs. - MapLibre CSS is imported by the map component.
Documentation
- Getting started and API docs live in
docs/. - Run locally:
pnpm --filter vue-maplibre-docs dev
Development
pnpm install
pnpm dev
pnpm lint
pnpm build
Contributing
Please read CONTRIBUTING.md before opening a pull request.
Related Packages
Version History
| Version | Released | Vue | License |
|---|---|---|---|
| 0.1.0 | ^3.5.0 | MIT | |
| 0.0.1 | MIT |