Replies: 1 comment 1 reply
-
Thanks for the idea @hrubysi . This is not a bad suggestion where we allow injection state to be accessible by devs. We can implement this in v2! 😁 |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The biggest painpoint of headless components is not being able to access it's internal state. There is always some case, when this is limiting.
This could be solved by exporting state injection hooks, giving us full control, which I find appropriate in library such as radix.
Then, inside my
PopoverContent
component, I can easily use this hook to accessopen
state.Thanks to this, I can turn following line:
'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95',
Into this, which I find as a big improvement.
This is only one simple example, but I can imagine many more.
What are your thoughts about this @zernonia?
Beta Was this translation helpful? Give feedback.
All reactions