Ionic2 Button with icon on top of text


#1

How can i make an icon button with the icon on top of the text

I tried adding a break tag but that didnt work. any ideas?

<button>
<ion-icon name='refresh'></ion-icon>
<br />
Refresh
</button>

#2

Not sure what you mean by text on top of button, please look at this link if you are looking for a button with icon and text. The below picture shows the end result and here is the source code for the attached image


#3

How about this?

<button> <div> <ion-icon name='refresh'></ion-icon> <br> <label>Refresh</label> </div> </button>


#4

worked for me, thanks!

PS
this works even without <_ br _> tag


#5

i think we must not use
here,

i think we can use CSS "clear: both;"
or
use

as container, and another div as sub-container for ion-icon

i hope ionic will give us, icon-top or item-top attributes at new update,
thx :slight_smile: