Styling Dropdown List created using NativeScript-Drop-Down plugin



I am trying to style a dropdown in such a way that i should be seeing only border at bottom with grey color. I tried doing it via CSS by taking border-color and border properties (with different combinations). However i was unable to get it. Here is what i am trying to achieve.


Can you please suggest on how can i style the dropdown?

My HTML is

<DropDown [items]="itemSource" (selectedIndexChanged)="onchange($event)" (opened)="onopen()" (closed)="onclose()" class="item-drop-down"

Here is my CSS

    font-size: 20;
    height: 40;
    padding: 4;
    width: 100%;
    border: 2;


This should work:


<GridLayout rows="auto" columns="*,10,auto" className="dropdown">
    <Label col="0" textWrap="false"/>
    <Label col="2" text="&#xf078;" fontFamily="FontAwesome"/>


.dropdown {
    padding: 7 5 7 5;
    border-bottom-style: solid;
    border-bottom-width: 0.5;
    border-bottom-color: #808080;


How does this behave like a dropdown?


Your question was “Can you please suggest on how can i style the dropdown?” … this is how to style the dropdown.


I believe you want to style the dropdown plugin, can you try reproducing the issue in playground so I may able to take a look.


Here is the project


Can you confirm which platform you are facing issues with?


Android. Only problem is styling using CSS. I am able to get data in dropdown.


Only thing which is missing in styling is bottom border. However i am not able to style the control. Can you please guide me on how do i find on which styles can be applied to this control?


You supposed to use border-width not just border.


With border-width, i lost my down arrow.


If you don’t want to loose arrow but still style, you have to do it Android’s way using drawables and themes.


Can you please elaborate or provide me some direction on how that can be achieved using nativescript?


If you are not familiar with Android’s theming, google for Dropdown themes it would give you set of XMLs you will have to place them in your app resources.