Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

vue-leaflet-sidepanel

cyclingbyte140MIT1.1.2TypeScript support: included

Slide side panel plugin for vue-leaflet

vue, vue3, vuejs, leaflet, leafletjs, vue-leaflet, @vue-leaflet/vue-leaflet, vue-leaflet-sidepanel, vue-leaflet-sidebar, leaflet-sidepanel, leaflet-sidebar

readme

npm version npm downloads npm license last commit

vue-leaflet-sidepanel

Slide side panel plugin for @vue-leaflet/vue-leaflet

This plugin is a wrapper for vue3 and based on cyclingbyte/Leaflet.SidePanel

Prerequirements

This packages targets Vue 3. There is no support for Vue 2 (it might work, but it might not)

Installation

# NPM
npm i vue-leaflet-sidepanel

# yarn
yarn add vue-leaflet-sidepanel

# pnpm
pnpm i vue-leaflet-sidepanel

Demo

You can find a demo here

Usage

Until the complete documentation is ready, please check the playground/App.vue as example usage. Feel free to ask questions in the discussion area if something is not clear

<template>
  <div style="width: fit-content; margin: auto">
    <l-map id="map" :zoom="15" :center="[53.0758, 8.8071]">
      <l-tile-layer
        url="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"
        layer-type="base"
        name="OpenStreetMap"
        :attribution="attribution"
      />
      <l-sidepanel id="leftPanel" :headings tabsPosition="left">
        <template #[`heading.1`]>
          <!-- Here you can custumize your tab if simple text is not enough. Follow the scheme #[`heading.<link>`] -->
          1. Tab
        </template>
        <l-sidepanel-tab link="1">
          <p>Content 1</p>
        </l-sidepanel-tab>
        <!-- [...] -->
      </l-sidepanel>
      <l-sidepanel id="rigthPanel" position="right" size="300px" dark-mode />
    </l-map>
  </div>
</template>

<script setup lang="ts">
  import 'leaflet/dist/leaflet.css';
  import 'vue-leaflet-sidepanel/dist/style.css';
  import { LMap, LTileLayer } from '@vue-leaflet/vue-leaflet';
  import { LSidepanel, LSidepanelTab } from 'vue-leaflet-sidepanel';

  const attribution =
    '&copy; <a href="http://osm.org/copyright">OpenStreetMap</a> contributors';

  const headings = [
    {
      // This is the link to the tab
      key: 1,
      // This is the text displayed in the tab, can be overridden with <template #[`heading.<link>`>
      value: 'Tab 1',
    },
  ];
</script>

Credits

Special thanks to maxwell-ilai for the original sidepanel maxwell-ilai/Leaflet.SidePanel

Visitors

Flag Counter

changelog

Leaflet.SidePanel Changelog

v1.1.2 (2025-04-24)

  • chore(deps): Bump leaflet.sidepanel from 1.2.1 to 1.2.2
  • chore(dev-deps): Bump some dev-deps to stay up to date and fix some vulnerabilities
  • chore(CI): Add permissions to workflows

v1.1.1 (2024-11-14)

  • chore(deps-dev): bump rollup from 4.21.3 to 4.25.0 in the npm_and_yarn group
  • chore(deps-dev): bump vue from 3.5.6 to 3.5.12
  • chore(deps-dev): bump eslint-plugin-oxlint from 0.9.6 to 0.11.1
  • chore(deps-dev): bump vite from 5.4.6 to 5.4.11
  • chore(deps-dev): bump vite-plugin-vue-devtools from 7.4.5 to 7.6.4
  • chore(deps-dev): bump @types/node from 22.5.5 to 22.9.0

v1.1.0 (2024-09-18)

Features

  • feat: set panel width via options

Dependencies

  • chore(eslint): use flat config
  • chore(deps): bump leaflet.sidepanel from 1.2.0 to 1.2.1
  • chore(deps-dev): bump @types/node from 20.14.5 to 22.5.2
  • chore(deps-dev): bump @vitejs/plugin-vue from 5.0.5 to 5.1.4
  • chore(deps-dev): bump eslint from 8.57.0 to 8.57.1
  • chore(deps-dev): bump eslint-plugin-vue from 9.23.0 to 9.28.0
  • chore(deps-dev): bump jsdom from 24.1.0 to 25.0.0
  • chore(deps-dev): bump typescript from 5.4.0 to 5.5.4
  • chore(deps-dev): bump vite from 5.3.1 to 5.4.6
  • chore(deps-dev): bump vitest from 1.6.0 to 2.1.1
  • chore(deps-dev): bump vue 3.4.38 from to 3.5.6
  • chore(deps-dev): bump vue-router from 4.4.3 to 4.4.5
  • chore(deps-dev): bump vue-tsc from 2.0.21 to 2.1.6

v1.0.0 (2024-08-29)

Initial release.