'primeng how to design dropdown like a button

enter image description hereI am using primeng to design my UI. i want a dropdown look like a button as shown in my attachment. can anyone help how to achieve this?

here is my code:

  <p-dropdown [options]="items" placeholder="SORT BY"></p-dropdown>

Thanks



Solution 1:[1]

In actual implementation they are using these css property:

.ui-dropdown .ui-dropdown-trigger {
border-right: none;
border-top: none;
border-bottom: none;
cursor: pointer;
width: 1.5em;
height: 100%;
position: absolute;
right: 0;
top: 0;
padding: 0 .25em;

}

Override the CSS like below .

.ui-dropdown .ui-dropdown-trigger{
 border-left:none;
}

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 DirtyMind