How to set size of ui-select?

xlhuang picture xlhuang · Aug 23, 2015 · Viewed 7.3k times · Source

I'm using ui-select with bootstrap. as we know, bootstrap has input-lg, input-sm... but is there a good way to change the size of ui-select?

Answer

Georgy picture Georgy · Sep 23, 2015

Could you please tell what is "a good way" for you? If CSS is good enough, then you can style elements with it, would look like this.

.form-input-sm .ui-select-toggle {height: 40px}

That is for simple HTML:

<ui-select theme="bootstrap" ng-model="model">
  <ui-select-match placeholder="Placeholder"></ui-select-match>
  <ui-select-choices refresh-delay="0" repeat="item in roleList">
    <div>{{item.name}}</div>
  </ui-select-choices>
</ui-select>

And I'm not magician, I don't know the selectors just looking at HTML here. If you need to find proper selectors, you can use browser developer tools. The same technique is used to override all default styles in Bootstrap, for example.