Augustine Joseph
Augustine Joseph

Reputation: 2287

Ionic Stacked input - Show label below text field

I am using the below code to show a stacked in Ionic version 2.

<ion-item>
    <ion-label color="primary" stacked>Joy to the world</ion-label>
    <ion-input value="C         G"></ion-input>
</ion-item>

By default the label displayed above the text field. But I want to show the label below the text field.

Is it possible to show the label below the text field.

Thanks for your help.

Upvotes: 1

Views: 2251

Answers (1)

amin arghavani
amin arghavani

Reputation: 1883

How about overwriting these sass variables:

.item-label-stacked .input-wrapper,
.input-wrapper {
    flex-direction: column-reverse;
}
.label-md[stacked] {
    margin-top: 0;
}

Upvotes: 2

Related Questions