how to make border bottom color transition
https://codepen.io/Vicky-clowdy/pen/MWNXmRN
I want that border bottom transition coming from center and to fill rest of border
Untitled
...
4 Replies
not really easy to do with a inline element (no pseudo elements present),
but with background images you can mock it up like a border and transition the size
there are 2 backgrounds on top of each other:
- the top (focus) starts 0% width
- the back (default) is 100% width
on transition, the top will grow to 100% so it covers the default color
the variable names are quite long, with that I hope it's descriptive enough for you to understand
here a working example: https://codepen.io/MarkBoots/pen/YzmvrjV
Thanks but I used mui elements
Thats something you should mention, also the codepen is not relevant. Please update. (you can also use codesandbox if that's easier)
Im no expert in react and mui, but after a bit of searching:
the default input already has the animating underline. To change its colors:
you coul;d also define themes, but that's totally out of my knowledge
Thanks for it
But do u think using mui slows down my project
Or any other ui libraries