web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / How to add Tooltip att...
Power Apps
Unanswered

How to add Tooltip attribute to a custom PCF Control?

(0) ShareShare
ReportReport
Posted on by 61

Hello

I have been trying to add a tooltip to a custom pcf control but i cannot get it to work. Is there any developer, that know how i can achieve a simple tooltip in a custom pcf control?

Currently im using this syntax: (Does not work!)

 

this._container.addEventListener("mouseover", function () {
 _this._isHovered = true;
 _this._notifyOutputChanged();
 this.style.cursor = 'pointer';

 const tooltip = document.createElement('div');
 tooltip.textContent = 'Test tooptip';

 tooltip.style.position = 'absolute';
 tooltip.style.background = 'rgba(0, 255, 0, 0.7)';
 tooltip.style.color = '#fff';
 tooltip.style.padding = '5px';
 tooltip.style.borderRadius = '5px';
 tooltip.style.left = (element.offsetLeft + 10) + 'px';
 tooltip.style.top = (element.offsetTop + 10) + 'px';

 document.body.appendChild(tooltip);
});

 

 

I have the same question (0)
  • cchannon Profile Picture
    4,702 Moderator on at

    Don't add the event listener to Container. Create a new child element with document.createElement("div") and attach that child to Container, not document.body. 

     

    Something like:

    let myDiv = document.createElement('div');
    
    //set various attributes to dev, including cursor style and mouseover listener
    
    this._container.appendChild(myDiv);
  • cchannon Profile Picture
    4,702 Moderator on at

    @JohnMarkPerez did this post help resolve your issue? If so, please mark the solution for future forum visitors to see!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 529 Most Valuable Professional

#2
Haque Profile Picture

Haque 230

#3
Kalathiya Profile Picture

Kalathiya 217 Super User 2026 Season 1

Last 30 days Overall leaderboard