My Angular app features a button labeled with "+".
When the user hovers over it, I use
element.append(' Add a New Number');
to add the text "Add a New Number" next to the + sign in the label.
Upon clicking the button, a new number is added and the label reverts back to "+".
I want to animate either the change in button size or the text label change. However, applying a CSS transition to width
has shown no effect so far.
Any ideas?
UPDATE: Just to clarify, this is a bootstrap input group button. I'm trying to avoid setting specific widths or using CSS transforms to prevent any issues with the button display at different screen sizes.
Here are the two states:
https://i.sstatic.net/BMfWi.png
https://i.sstatic.net/a2muW.png
I was hoping that by injecting more words, the existing button would naturally stretch.