Stripe Arrow Animation
So stripe.com has a little arrow animation (along with the dropdown) when hovering on a button which is from the bottom to top. I want to do the same stuff, with Tailwind. For now I have the code for making it from left to center
I have no time for setting up some live code, please try fix to & let me know. This should be simple and straightforward nothing too much complicated
32 Replies
It would help if you made a minimal reproducible example in codepen or codesandbox
cant
these platforms literally sucks
@vince https://playcode.io/1582428
PlayCode.io
Tailwind CSS Playground
Try this online Tailwind CSS Playground playground with instant live preview and console. Easy & Fast. Experiment yourself.
Sent full code, hover on the solution button
you probably want to change
to
are you able to delete it @Mannix
you don't want to transalate x on hover but translate y 😉
yeh tried that and didnt work, trying with the code
u sent me
its working but
its not working
nice so its working but it's not
i slowed down the animation
isn't
translate-y-0 group-hover:translate-y-5
it working in the playcode thingy
yeah
first you want to hide it and then on hover show it so do first part first
wtf
do the first part and place the arrow below the dropdown box
or under i should say
put hover in dev tools on that li element so the dropdown shows up
then figure out what you need to do to hide the arrow under that dropdown
As you can see the arrow is goes from the bottom to top
figured out a way
translate-y-1 group-hover:translate-y-0
you are translating the dropdown on hover and they do not
wtf?
in playcode you have
group-hover:translate-y-5
on dropdown and it should be just translate-y-5
yes but that doesnt 'hide' the bottom in my code
why is your code in the playcode different from your actual project ??
idk
just use the code from playcode in your project then
no its different it uses components
also i would add
transalte-y-4
on the dropdown if you have group-hover:translate-y-5
already on it so the translate is very minimalanyways this is kinda tricky
i want to do this animation
if you do that your are pretty close to what stripe has
.
@vince