MARKETPLACE
PLUGINS
SVG INTERACTIVE ELEMENTS
SVG interactive elements logo

SVG interactive elements

Published February 2024
   •    Updated January 2026

Plugin details

This plugin is designed for SVG graphics interaction within Bubble, enabling users to interact with SVG elements through clicks, scaling, and panning.
The plugin allows users to click on individual SVG elements, changing their color to indicate activity and tracking the IDs of active elements. Additionally, the plugin offers functionality for zooming and panning within the SVG, making it particularly useful for interactive graphic interfaces that require detailed SVG content viewing.

You can use this plugin to create:
- interactive maps
- seating areas
- aircraft/train/bus seat selection

If you have any questions, improvements and bugs, please contact me:
telegram: esporykhin
email: [email protected]

$49

One time

stars   •   0 ratings
19 installs  
This plugin does not collect or track your personal data.

Platform

Web

Contributor details

sporyx.in logo
sporyx.in
Joined 2020   •   6 Plugins
View contributor profile

Instructions

You need to: - Place an HTML element on the page
- Paste svg code to HTML
- Place this element in a group
- Assign unique id's to the HTML element and the group

To use the plugin, you need to set two main properties:

svg_id: The identifier of the <svg> container with which the plugin will interact.
group_id: The identifier of the group or container that holds the HTML element and will be used for scaling and panning.

Main Features
Zooming: Users can scale the SVG content using the provided '+' (zoom in) and '-' (zoom out) buttons. Zooming is implemented by changing the scale of the SVG.
Panning: Panning allows users to move the visible area of the SVG by clicking and dragging the content with a mouse or finger on touch devices.
Element Clicks: Clicking on SVG elements toggles their activity state, visually indicated by a change in color. The plugin tracks active elements and updates a list of active element IDs.

Working with Active Elements
The plugin supports a "toggle" logic for SVG element activity. Clicking an element makes it active (color changes), and clicking it again deactivates it (returns to the original color). Active element IDs are stored in an array and are accessible through the click_on state.

Creating and Styling Zoom Buttons
Zoom buttons are dynamically created and styled, with the possibility to customize colors, size, and other CSS properties through the plugin's properties.

Initialization and Events
The plugin automatically initializes after the document is fully loaded. Events are generated for SVG elements that are clicked, allowing developers to perform additional actions or processing in Bubble.

Publishing States and Events
svg_ids: list of all id's that are present on the svg
click_on: A state containing an array of active SVG element IDs.
svg_element_is_clicked: An event triggered when an SVG element is clicked.

Usage Example
To use the plugin, simply add it to your Bubble project, configure the svg_id and group_id properties according to your SVG content and prepared elements on the page. After that, you will be able to interact with SVG elements, zoom and pan content, and retrieve data about active elements for further logic in your application.

Editor link:
https://bubble.io/page?type=page&name=svg_map&id=nch-plugins-tests&tab=tabs-1

Types

This plugin can be found under the following types:
Background Services   •   Element   •   Event   •   Action

Categories

This plugin can be found under the following categories:
Technical   •   Ecommerce   •   Data (things)   •   Visual Elements

Resources

Support contact
Documentation
Tutorial

Rating and reviews

No reviews yet

This plugin has not received any reviews.
Bubble