progress.progress.linearProgress.title

쉬움

progress.progress.linearProgress.description

#animation#css-only#smooth

라이브 데모

10%

코드

LinearProgress.tsx
export const LinearProgress = () => {
  const [progress, setProgress] = useState(0);
  useEffect(() => {
    const interval = setInterval(() => {
      setProgress(prev => prev >= 100 ? 0 : prev + 10);
    }, 500);
    return () => clearInterval(interval);
  }, []);
  return (
    <div className="linear-progress-container">
      <div className="linear-progress-bar" style={{ width: `${progress}%` }}>
        <span className="linear-progress-text">{progress}%</span>
      </div>
    </div>
  );
};
progress.css
.linear-progress-container {
  width: 100%;
  height: 30px;
  background: var(--bg-tertiary);
  border-radius: 15px;
  overflow: hidden;
}
.linear-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-purple) 0%, var(--accent-pink) 100%);
  transition: width 0.3s ease;
}