App.jsx
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
import { CircularProgressbar } from "react-circular-progressbar"; import "react-circular-progressbar/dist/styles.css"; const percentage = 90; // Can use browser detection logic here to determine this instead const needDominantBaselineFix = true; const App = () => ( <div> <div style={{ width: "100px" }}> <CircularProgressbar value={percentage} text={ <tspan dy={needDominantBaselineFix ? -15 : 0}>{percentage}%</tspan> } /> </div> </div> ); export default App |