GODRICH
#css-animation#button#loader#transition#scroll#dashboard#ui#design-trends

04Profile detail — a card that measures bio height to decide whether read-more even appears

Comparing the bio element's scrollHeight before and after line-clamp is applied computes whether the text is actually truncated before anything else happens, and when there's no difference the read-more button never renders at all -- so a short bio never ends up with a useless button.

Best forMember detail modals, profile card backs

scrollHeightclassList.togglearia-expanded
Profile detail — a card that measures bio height to decide whether read-more even appears
Open in a new tab

04 Profile detail — a card that measures bio height to decide whether read-more even appears — Measured area 17.345% · moving frames 6/23Original by GODRICH · SCSS and React ship in the zip · 9 Team Page Design Patterns (Copy-Paste)

The post this demo lives in

9 Team Page Design Patterns (Copy-Paste) - preview of all 9 demos9 Team Page Design Patterns (Copy-Paste)Nine team-page sections that compute their layout: columns balance by headcount, bios get read-more only past overflow, See all demos in this post

If you like this effect - similar demos