SLDS progress bar is a graphical representation of progress. We can show the progress bar in many ways. Here we will do that thing in two ways.
1. By using a formula field
2. Directly use in Visualforce page or Component
1. By using a formula field: Create a percentage formula field in the object. You can use the mentioned formula for reference. CASE(PicklistValue__c,'Draft',1,'Submit',2,'In Progress',3,'Approval Pending',4,'Approved',5,0)/5
Use your picklist field in place of PicklistValue__c, replace picklist values from yours, and assign an incremental number as mentioned above. We are doing this to get the percentage of progress.
Now we will move to the next step to visualize that percentage on visualforce page.
visualforce page code/ Component Code:-
<div class="slds-progress-bar" aria-valuemin="0" aria-valuemax="8" aria-valuenow="{!PicklistValue__c}" role="progressbar">
<span style="width:{!PicklistValue__c}%;" class="slds-progress-bar__value {!CASE(status__c,'Draft','slds-progress-bar__value_success','Submit','slds-progress-bar__value_success','Approved','slds-progress-bar__value_success','')}">
<span class="slds-assistive-text">{!PicklistValue__c}%</span>
</span></div>
OUTPUT:
<div class="slds-progress-bar" aria-valuemin="0" aria-valuemax="8" aria-valuenow="{!(CASE(Status,'Draft',1,'Pending',2,'Approval Pending',3,'Approved',4,0)/4)*100}" role="progressbar">
<span style="width:{!(CASE(Status,'Draft',1,'Pending',2,'Approvals Pending',3,'Approved',4,0)/4)*100}%;" class="slds-progress-bar__value {!CASE(status,'Pending','slds-progress-bar__value_success','Approval Pending','slds-progress-bar__value_success','Approved','slds-progress-bar__value_success','')}">
<span class="slds-assistive-text">{!(CASE(Status,'Draft',1,'Pending',2,'Approval Pending',3,'Approved',4,0)/4)*100}%</span>
</span> </div>