Back to home

InstallationUsageBefore vs after
Hello Shave main image

Hello Shave

Have you ever run into the issue of grids breaking when content input is too long? While there are a number of solutions to restraining height on elements, one that I like comes in Shave from the Dollar Shave Club.


1 2 3 4 # npm npm install --save shave # or yarn yarn add shave


Incredibly simple.

1 2 3 4 5 6 7 // code omitted for brevity import shave from "shave"; // restrain height to 70px const selector = ".shave"; const height = 70; shave(selector, height);

Before vs after

Issue beforehand

Issue beforehand

Issue after

Issue after

Hello is a series that is about short, sharp examples. Read more on this series to find small gems to add your toolset.

Dennis O'Keeffe

  • Melbourne, Australia

Hi, I am a professional Software Engineer. Formerly of Culture Amp, UsabilityHub, Present Company and NightGuru.
I am currently working on, Den Dribbles and LandPad .

Related articles


Get fresh posts + news direct to your inbox.

No spam. We only send you relevant content.