A React library that smartly truncates multi-line rich text while perfectly preserving inline formatting like bold, italics, code, and emojis.
How It Works
While building an app with long formatted text like bold words or links, you search for a smarter way to shorten it without messing up the styles.
Jump into the online demo to drag and resize boxes, watching text magically shorten while keeping bold, italics, and emojis perfect.
With one easy step, bring this truncation magic into your own project so it works just like in the demo.
Place your long paragraph or file path inside the simple container tags, telling it how many lines to show.
Resize your screen or box, and watch the text cut off neatly at the right spot, preserving all formatting like strong bold or code snippets.
Drop in a toggle button that expands to full text when clicked, making it user-friendly.
Your app now shows clean, professional truncated text everywhere, delighting users with smooth expand and flawless styles.
Star Growth
Repurpose is a Pro feature
Generate ready-to-use prompts for X threads, LinkedIn posts, blog posts, YouTube scripts, and more -- with full repo context baked in.
Unlock RepurposeSimilar repos coming soon.