Search results

Customize icon and width in Blazor DropDownButton component

Width of the DropDownButton can be customized by setting required width to the dropdown element.

The following UI can be achieved by setting IconPosition as Top, width as 85px and size of the font icon as 40px by adding e-custom class.

@using Syncfusion.EJ2.Blazor.SplitButtons

<EjsDropDownButton IconCss="e-icons e-search" CssClass="e-custom" IconPosition ="SplitButtonIconPosition.Top" Content="Search">
  <DropDownButtonItems>
      <DropDownButtonItem Text="Find"></DropDownButtonItem>
      <DropDownButtonItem Text="Replace"></DropDownButtonItem>
      <DropDownButtonItem Text="Go To"></DropDownButtonItem>
  </DropDownButtonItems>
</EjsDropDownButton>

<style>

.e-search::before {
  content: '\ec0d';
}

.e-dropdown-btn.e-custom {
  width: 85px;
}

.e-dropdown-btn.e-custom .e-search::before {
  font-size: 40px;
}
</style>

Output be like

Button Sample