Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 48978

Ionic unfocus searchbar placeholder to align left

$
0
0

I would like to know if it’s possible to align Ionic searchbar placeholder to the left side when unfocus?

image

as of right now the placeholder is currently centered when unfocus

<ion-searchbar
  slot="bottom"
  mode="ios"
  autocomplete="off"
  autocorrect="off"
  spellcheck="false"
  animated="true"
  debounce="500"
  clearIcon="close"
  [placeholder]="placeholder"
  [(ngModel)]="search"
  (ionChange)="runSearch()"
></ion-searchbar>
ion-searchbar {
  height: 40px;
  padding: 0px;
  border: 1px solid rgba(0, 56, 100, 0.4);
  box-shadow: none !important;
  border-radius: 6px;
  margin: 8px 0 12px;
  --border-radius: 6px;
  --background: white;
  --placeholder-color: red;

  text-align: start !important; // not working
  text-align: left !important; // not working
  align-items: flex-start; // not working

  &::placeholder {
    text-align: left; // not working
  }
}

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 48978

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>