![]() |
React Suite is a front-end library designed for the middle platform and back-end products. The React Suite Progress component allows the user to see the progress of a certain program or any operation in the process. The <Progress.Circle> component displays the progress as a circle. The props used are described below:
Syntax: <Progress.Circle/> Prerequisite:
Creating React Application and Module installation: Step 1: Create the react project folder, for that open the terminal, and write the command npm create-react-app folder name, if you have already installed create-react-app globally. If you haven’t, install create-react-app globally using the command npm -g create-react-app or install locally by npm i create-react-app. npm create-react-app project Step 2: After creating your project folder (i.e. project), move to it by using the following command. cd project Step 3: now install the dependency by using the following command: npm install rsuite Project Structure: It will look like this: ![]()
Example 1: We are importing the Progress Component from “rsuite”, and to apply the default styles of the components we are importing “rsuite/dist/rsuite.min.css”. We are adding four <Progress.circle> components, with some styling. To the first, we are passing percent and gapDegree props. To the second component, we are passing gapDegree, strokeLinecap, status, percent, and strokeWidth. To the third component, we pass the gapDegree, gapPosition, strokeLinecap, strokeColor, percent, and showInfo set to false. For the fourth one, we are passing the props percent and trailColor. App.js
Step to Run Application: Run the application using the following command from the project’s root directory. npm start Output: ![]()
Example 2: To the first <Progress.Circle> component, we are passing the classPrefix as “progress”, gapDegree, strokeLinecap, percent, status, trailColor, trailWidth, strokeWidth, showInfo and gapPosition. To the second component, we are passing the props gapDegree, gapPosition, strokeColor, percent, and classPrefix as ‘nav’. To the third component, we are passing the percent,trailColor, and classPrefix as ‘sidenav’. App.js
Step to Run Application: Run the application using the following command from the project’s root directory. npm start Output: ![]()
Reference:https://rsuitejs.com/components/progress/#code-lt-progress-circle-gt-code |
Reffered: https://www.geeksforgeeks.org
ReactJS |
Related |
---|
|
![]() |
![]() |
![]() |
![]() |
Type: | Geek |
Category: | Coding |
Sub Category: | Tutorial |
Uploaded by: | Admin |
Views: | 12 |