components icon indicating copy to clipboard operation
components copied to clipboard

Proposal: Ripple effect

Open danielchalmers opened this issue 1 year ago • 4 comments

A ripple effect for interactable components:

https://github.com/pureblazor/components/assets/7112040/8edcf692-ef98-4624-aa58-25386974841c

It should originate from the pointer:

https://github.com/pureblazor/components/assets/7112040/2ed017bf-146d-4191-b7aa-fe41253915f3

It should start when the pointer is held and end when the pointer is released (with a minimum of about half a second or so):

https://github.com/pureblazor/components/assets/7112040/25d288c2-d4bd-4bef-ada5-055ded525cf8

And it should be able to ripple multiple times at once:

https://github.com/pureblazor/components/assets/7112040/71222bd7-d705-4f25-9d11-c9502f10ddb0

danielchalmers avatar Apr 29 '24 04:04 danielchalmers

I like it - we previously had a "jiggle" effect that had to be temporarily removed, we can probably look at how to enable both of these things with the theming or a PressedStyles parameter.

codymullins avatar Apr 29 '24 13:04 codymullins

Re-added base for this functionality in https://github.com/pureblazor/components/commit/0ca0ffb0df347c67f0c73767d817050375be0340

codymullins avatar May 03 '24 18:05 codymullins

Re-added base for this functionality in 0ca0ffb

@codymullins Cool! I see onmousedown, onmouseup, onclick (MouseEventArgs) - Does it work with touch? onpointerdown might work better 🤔

danielchalmers avatar May 04 '24 04:05 danielchalmers

good call - I noticed touch wasn't working correctly when testing from my phone lasts night.

codymullins avatar May 04 '24 09:05 codymullins