Read my book

I wrote books about Webpack and React. Check them out!

Wednesday, April 1, 2015

react-ellipsify - Simple ellipsis for React.js

For some reason I couldn't find a nice ellipsis library for React.js so I ended up developing my own. Check out react-ellipsify. It has the basic functionality you might expect (controls over amount of items to show, separator to use and so on).

This can be useful if you want to temporarily hide some content (good UX). It might be fun to add animations etc. later on if there is interest.

Compared to a jQuery version I developed earlier, it was much faster and more fun to develop the React one. There's less code and it's easier to understand. Only traversal code is complex but that cannot be avoided here. Have fun ellipsifying!