htmlcssionicons

How to change title of an ion-icon?


I'm trying to change the ion-icon title that appears on mouse-hover.
Example: pic
I've tried for at least a couple of hours to find a solution for this. I just don't know how i can access the title element of ion-icon via css to be able to change the content of it to 'Edit' instead of 'Create'. Any help would be appreciated.


Solution

  • You may try disabling ion-icon popup using CSS event blocking and set "title" property on to a parent element.

    CSS

    ion-icon {
     pointer-events: none;
    }
    

    Or you can create Icon element using the below code as a workaround and set it on a button.

    const icon = <Icon icon='arrow-right' title={false} />;
    return <Button minimal icon={icon} title='Next' />;
    

    Details here - https://github.com/palantir/blueprint/issues/2321