react-dropdown-menu is bigger than other similar packages #1424
-
Hey, I wanted to add a "headless Dropdown" and found a few alternatives: First I integrated
For me this is an important difference so I switched packages. However I wanted to ping you here and ask you if you knew about this? Can it be optimized, or is it because of more features out-of-the-box? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @iampava, Thanks for opening this up.
You guessed it correctly, that is the reason why it's bigger than these other libraries. For example, headless-ui lacks:
Both headless-ui and reach-ui lack:
Here's a basic list of features we support out-of-the-box: Important to note also, the size reported on our website are coming from the BundlePhobia API (when it works! 😅) so:
I am sure if we focus even more attention to tree-shaking optimisation, there might be other potential weight savings. That being said, BundlePhobia will always report the full size of everything exported in the package, whether you will use it or not. Hopefully that helps understand the difference in size! ✌️ |
Beta Was this translation helpful? Give feedback.
Hi @iampava,
Thanks for opening this up.
You guessed it correctly, that is the reason why it's bigger than these other libraries.
Radix's
DropdownMenu
offers many more features.For example, headless-ui lacks:
Both headless-ui and reach-ui lack:
Here's a basic list of features we support out-of-the-box:
Important to note also, the size reported on our website are coming from the BundlePhobia API (when it works! 😅) so: