reagent

Bingen Galartza Iparragirre 2023-05-11T12:41:04.635779Z

Any tooltip library recommendation that plays well with reagent? The main goal is to build dropdown menus and information tooltips. We are using raw CLJS now, but correctly positioning the element is getting tricky.Thanks!

Bingen Galartza Iparragirre 2023-05-12T07:56:35.473219Z

Ok, thanks I will give look to react-tooltip

Bingen Galartza Iparragirre 2023-05-12T07:57:31.518479Z

We are currently experimenting with https://floating-ui.com/ Will post here our final conclusion. Just in case it's useful for someone in the future

Rupert (Sevva/All Street) 2023-06-12T07:22:57.633069Z

You can leverage the react ecosystem with a complete (light weight) widget library like https://ant.design/. Shadow CLJs helps with the interop and it’s even easier if you use https://github.com/roman01la/uix/https://github.com/pitch-io/uix instead of reagent.

Bingen Galartza Iparragirre 2023-06-12T07:41:15.295619Z

We ended up using FloatingUI via interop for both tooltips and dropdown menus. Creating the required cljsjs packages was a bit tedious (we are still on lein+figwheel) and the interop is not very elegant (specially because it uses React hooks). But apart from it works smoothly.

πŸ‘ 1
p-himik 2023-05-11T12:42:41.807709Z

I'd use some React library for that instead of searching for a CLJS solution.

πŸ‘ 1
p-himik 2023-05-11T12:43:02.899959Z

And probably 2 separate libraries - one for drop-downs and one for tooltips.

hifumi123 2023-05-12T01:09:01.426279Z

Agreed on both. I've had good luck in the past using react-tooltip and tooltips from component libraries like Material UI

hifumi123 2023-05-12T01:09:49.800619Z

Menus should have separate treatment since they have different requirements and design than tooltips. The only thing in common is the need to anchor to an element and listening for clicks

Michelle Lim 2023-05-19T20:41:57.334049Z

this is late, but i really like radix https://www.radix-ui.com/docs/primitives/components/tooltip lots of accessibility baked in