Create dropdownbutton with rounded corner in Vue Drop down button component
11 Jun 20243 minutes to read
DropDownButton with rounded corner can be achieved by adding border-radius
CSS property to button element.
In the following example, e-round-corner
class is defined with 5px
border-radius
property and added that class to button element using cssClass
property.
<template>
<ejs-dropdownbutton :items='items' cssClass='e-round-corner'>Clipboard</ejs-dropdownbutton>
</template>
<script setup>
import { DropDownButtonComponent as EjsDropdownbutton } from "@syncfusion/ej2-vue-splitbuttons";
import { enableRipple } from '@syncfusion/ej2-base';
enableRipple(true);
const items = [
{
text: 'Cut'
},
{
text: 'Copy'
},
{
text: 'Paste'
}];
</script>
<style>
@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-round-corner {
border-radius: 5px;
}
</style>
<template>
<ejs-dropdownbutton :items='items' cssClass='e-round-corner'>Clipboard</ejs-dropdownbutton>
</template>
<script>
import { DropDownButtonComponent } from "@syncfusion/ej2-vue-splitbuttons";
import { enableRipple } from '@syncfusion/ej2-base';
enableRipple(true);
export default {
name: "App",
components: {
"ejs-dropdownbutton": DropDownButtonComponent,
},
data() {
return {
items: [
{
text: 'Cut'
},
{
text: 'Copy'
},
{
text: 'Paste'
}]
};
}
}
</script>
<style>
@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-round-corner {
border-radius: 5px;
}
</style>