Customize icon and width in Vue Drop down button component

27 Feb 20232 minutes to read

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.

<ejs-dropdownbutton :items='items' iconCss='e-icons e-search' cssClass='e-custom' iconPosition='Top'      content='Find & Select'></ejs-dropdownbutton>

import Vue from 'vue';
import { DropDownButtonPlugin } from "@syncfusion/ej2-vue-splitbuttons";
import { enableRipple } from '@syncfusion/ej2-base';


export default {
    data () {
        return {
                text: 'Find'
                text: 'Replace'
                text: 'Go To'
                text: 'Go To Special'

  @import '../node_modules/@syncfusion/ej2-base/styles/material.css';
  @import '../node_modules/@syncfusion/ej2-buttons/styles/material.css';
  @import '../node_modules/@syncfusion/ej2-popups/styles/material.css';
  @import '../node_modules/@syncfusion/ej2-splitbuttons/styles/material.css';
    .e-search::before {
    content: '\e993';

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

    .e-dropdown-btn.e-custom .e-search::before {
    font-size: 40px;