Add Support for Custom Tooltip to View the Original Text #16
Replies: 2 comments 2 replies
-
Thank you for your suggestion on this project! Can the Tooltip component provided by the UI framework be used to meet this requirement? e.g. Tooltip - Shadcn UI . export function TooltipDemo() {
return (
<TooltipProvider>
<Tooltip>
<TooltipTrigger>
{truncatedText}
</TooltipTrigger>
<TooltipContent>
{originalText}
</TooltipContent>
</Tooltip>
</TooltipProvider>
)
} If I understand it wrongly, I need more introduction of ideas. Thx! |
Beta Was this translation helpful? Give feedback.
-
Hi, considering that different projects will use different UI frameworks, I only provide an introduction to usage in the document. There is now a demonstration area in the documentation for advanced usage, including the Tooltip scenario mentioned in this discussion, see: Thanks again for this excellent advice! |
Beta Was this translation helpful? Give feedback.
-
First, I want to express my gratitude for your continued efforts in maintaining the react-truncate library. Your work is greatly appreciated by the community.
I would like to propose an enhancement to the library: adding support for a custom tooltip to view the original, untruncated text. This feature would allow users to easily see the full content without the need to expand the text manually.
Beta Was this translation helpful? Give feedback.
All reactions