Customize progress using cssclass in EJ2 TypeScript Progress button control
10 May 20233 minutes to read
You can customize the background filler UI using the cssClass
property.
- Adding
e-vertical
tocssClass
shows vertical progress. - Adding
e-progress-top
tocssClass
shows progress at the top.
You can also show reverse progress by adding custom class to the cssClass
property.
import { ProgressButton } from '@syncfusion/ej2-splitbuttons';
let vertcialProgress: ProgressButton = new ProgressButton({ content: 'Vertical Progress', enableProgress: true, cssClass: 'e-hide-spinner e-vertical', duration: 4000 });
vertcialProgress.appendTo('#vertical');
let topProgress: ProgressButton = new ProgressButton({ content: 'Progress Top', enableProgress: true, cssClass: 'e-hide-spinner e-progress-top', duration: 4000 });
topProgress.appendTo('#top');
let reverseProgress: ProgressButton = new ProgressButton({ content: 'Reverse Progress', enableProgress: true, cssClass: 'e-hide-spinner e-reverse-progress', duration: 4000 });
reverseProgress.appendTo('#reverse');
<!DOCTYPE html>
<html lang="en">
<head>
<title>EJ2 ProgressButton</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="This sample is to customize progress indicator with top, reverse and vertical in the progress button" />
<meta name="author" content="Syncfusion" />
<link href="https://cdn.syncfusion.com/ej2/28.1.33/ej2-base/styles/material.css" rel="stylesheet" />
<link href="https://cdn.syncfusion.com/ej2/28.1.33/ej2-buttons/styles/material.css" rel="stylesheet" />
<link href="https://cdn.syncfusion.com/ej2/28.1.33/ej2-popups/styles/material.css" rel="stylesheet" />
<link href="https://cdn.syncfusion.com/ej2/28.1.33/ej2-splitbuttons/styles/material.css" rel="stylesheet" />
<link href="styles.css" rel="stylesheet" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/systemjs/0.19.38/system.js"></script>
<script src="systemjs.config.js"></script>
<script src="https://cdn.syncfusion.com/ej2/syncfusion-helper.js" type ="text/javascript"></script>
</head>
<body>
<div id='loader'>LOADING....</div>
<div id='container'>
<button id='vertical'></button>
<button id='top'></button>
<button id='reverse'></button>
</div>
</body>
</html>
.e-reverse-progress .e-progress {
right: 0;
left: auto;
}
button {
margin: 25px;
}
#container {
visibility: hidden;
}
#loader {
color: #008cff;
height: 40px;
left: 45%;
position: absolute;
top: 45%;
width: 30%;
}