What's the status on using haptics in compose, wha...
# compose
s
What's the status on using haptics in compose, what have you folks done in the past to make it work? I know there used to be some compose API that was dropped with the replacement being to just use the View apis instead, is that still the case? Optimally, I'd love to have a way to just be able to use
clickable
and/or the card/surface apis among others that take in an onClick lambda and just get some default haptics going. Is that something which is possible already right now and I am not aware of it perhaps?
m
LocalHapticFeedback
has been around for a while. The docs show it for long-presses, for example. Sinsamaki uses it for pull-to-refresh in this post. Or are you looking for something else?
thank you color 1
s
I actually didn't know this exists 🤦‍♂️ I suppose that's what I want, but I then need to be diligent and make sure we call it on every single thing that is clickable in the entire codebase, is that the case? I was sort of also looking for ways to simply enable it for the entire codebase if there was such an option.
m
I then need to be diligent and make sure we call it on every single thing that is clickable in the entire codebase, is that the case?
Put it in your design system! 😉
I was sort of also looking for ways to simply enable it for the entire codebase if there was such an option.
I cannot rule that out, but I'm not aware of a solution for that.