Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Element-UI: How to increase icon size of buttons?

Tags:

element-ui

I am simply showing a button like this:

<el-button plain circle icon="el-icon-refresh"></el-button>

But the icon inside the button is too small. Is there a way to enlarge the icon only? I am using Vue.js for my project.

like image 470
Akshdeep Singh Avatar asked Feb 04 '26 08:02

Akshdeep Singh


1 Answers

Element-ui doesn't support this by it's API. However the icon attribute places a class on i-element within a button. you are able to add a second class and add you own styling.

<el-button plain circle icon="custom-icon el-icon-refresh"></el-button>

CSS:

.custom-icon {
   font-size: 2rem;
}
like image 160
dreijntjens Avatar answered Feb 06 '26 06:02

dreijntjens