38
Views
12
Comments
Inline Svg or image

Im Planning to do this image interactive each part should be clickable how to i achieve that using inline svg anyone please


2024-07-12 05-57-50
Gourav Shrivastava
Champion

Hello @Benedict cruz 

Can you please share an SVG of this image if you have already?

UserImage.jpg
Benedict cruz

I dont have yet do u recommend any software that make it a svg code

2024-07-12 05-57-50
Gourav Shrivastava
Champion
2024-07-12 05-57-50
Gourav Shrivastava
Champion

Hello, I tried something for you 

https://personal-eewexkfl.outsystemscloud.com/SmartRichTextEditorLiteDemo/InlineSVG.html

Check this link. What I basically did was separate each and every clickable body part in SVG and place them desired place. You can check my code, I am sharing it will be very helpful for you. 


What you need to do:-

1) Separate each and every clickable body part as an image using online tools like:- 

https://www.freeconvert.com/png-to-svg

https://convertio.co/png-svg/

convert them into SVG and place them 

2) Check my code and make it clickable 


InlineSVG.html
2024-09-14 05-42-00
Ozan Can Çalı
Champion

Hi Benedict,

There is a widget called "Inline SVG" in OutSystems UI to render SVGs, have you tried checking it out? 
https://outsystemsui.outsystems.com/OutSystemsUIWebsite/PatternDetail?PatternId=597


It accepts SVG code that looks like this:


So you would need to convert your image into SVG first.

2025-12-18 01-28-51
Peter Hieu

Hi @Benedict cruz 

You can check the OML file below. 

Hope this helps,

Peter Hieu

InteractiveImageSVG.oml
UserImage.jpg
Benedict cruz

thank you sir @Peter Hieu 

2025-12-18 01-28-51
Peter Hieu

If you want the SVG image to look better, you can style it to fit your use case. 

2024-09-12 02-43-38
Deepsagar Dubey

Hello @Benedict cruz 

You can try the Image Map forge component, The image map enables specific areas of an image to be clickable, acting as links to different destinations.

The Image map is a type of image that contains one or more clickable areas. These clickable areas, known as "hotspots," are defined using coordinates on the image. Each hotspot can trigger different actions when clicked 

Thanks
Deep


UserImage.jpg
Niteesh yadav

Hi Benedict,

I've built something similar before, where an SVG needed to be interactive. You can approach it like this:

1. Put the SVG inside a Web Block

This keeps the map isolated and reusable.

2. In the OnReady of the Web Block, run a JavaScript

Use it to attach click events and update visuals dynamically.

Example:

const selectedStates = $parameters.SelectedStates.split(",");

selectedStates.forEach(state => {
    const element = document.getElementById(state);

    if (element) {
        element.classList = "enabled";   // This applies the highlight style
    }
});

3. On click, update state + send back to parent

Assign the clicked area’s ID/name to a local variable, then trigger an event so the parent screen can store it or run logic against it.

2025-01-24 02-53-49
Mustafa Emad Shaker

Hi @Benedict cruz,

I think this question is related to another question you posted.

https://www.outsystems.com/forums/discussion/105492/how-to-make-a-interactive-clickable-svg-in-phone/

I am adding this reply, so that if someone opens it, he/she can find the answer.

Regards,
Mustafa.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.