profile
viewpoint

Ask questionsHow can one make a scrollable Tippy?

How can one make the content of a Tippy scrollable if the parent/viewport doesn't allow enough space for the Tippy to display in full?

Here's a Codepen

ok

not-ok

Setting a CSS max-height would work, but not with dynamic heights such as the viewport.

Thanks for everything you do for this lib, it is awesome!

atomiks/tippyjs

Answer questions atomiks

That's an interesting and difficult question, I don't think it's easy to do with CSS.

I think you could add some code in popperOptions.onUpdate that calculates the distance between the bottom of the reference element and the bottom of the viewport (and also all the different variations/placements it can have) and set the max-height based on that

useful!
source:https://uonfu.com/
Github User Rank List