Use a title attribute on the div like example below:
constlongText="Hey everyone, This code shows how we can truncate long strings so that they can shown as ellipsis. we can use 100% width to adjust text in one line."<divtitle={longText}>{longText}</div>
Now if user hover over div tag it will show the whole text in something like tooltip.
Use a
title
attribute on thediv
like example below:Now if user hover over
div tag
it will show the whole text in something like tooltip.Happy coding!
Thank you