🎨
UI Knihovna
Kolekce nádherných, znovupoužitelných React komponent a CSS fragmentů vytvořená pomocí Tailwind CSS a Framer Motion.
Ukazatele průběhu
Vizuální indikátory dokončení úkolu nebo stavu načítání.
Lineární průběh
Uploading...65%
Progress.tsxLanguage: tsx
import { motion } from 'framer-motion';
export function LinearProgress({ value }: { value: number }) {
return (
<div className="w-full max-w-md">
<div className="flex justify-between items-center mb-2">
<span className="text-sm font-semibold text-foreground">Uploading...</span>
<span className="text-sm font-bold text-accent">{Math.round(value)}%</span>
</div>
<div className="h-3 w-full bg-surface border border-border rounded-full overflow-hidden">
<motion.div
className="h-full bg-accent relative"
initial={{ width: 0 }}
animate={{ width: `${value}%` }}
transition={{ duration: 0.5, ease: "easeOut" }}
>
{/* Animated subtle shine effect */}
<div className="absolute top-0 left-0 bottom-0 right-0 bg-gradient-to-r from-transparent via-white/20 to-transparent -translate-x-full animate-[shimmer_2s_infinite]" />
</motion.div>
</div>
</div>
);
}Kruhový průběh
65%
Progress.tsxLanguage: tsx
import { motion } from 'framer-motion';
export function CircularProgress({ value }: { value: number }) {
const radius = 40;
const circumference = 2 * Math.PI * radius;
const strokeDashoffset = circumference - (value / 100) * circumference;
return (
<div className="relative flex items-center justify-center w-32 h-32">
{/* Background Circle */}
<svg className="w-full h-full -rotate-90" viewBox="0 0 100 100">
<circle
cx="50"
cy="50"
r={radius}
stroke="currentColor"
strokeWidth="8"
fill="none"
className="text-black/5"
/>
{/* Progress Circle */}
<motion.circle
cx="50"
cy="50"
r={radius}
stroke="currentColor"
strokeWidth="8"
fill="none"
strokeLinecap="round"
className="text-accent"
initial={{ strokeDashoffset: circumference }}
animate={{ strokeDashoffset }}
transition={{ duration: 0.8, ease: "easeOut" }}
style={{ strokeDasharray: circumference }}
/>
</svg>
{/* Center Text */}
<div className="absolute flex flex-col items-center justify-center text-accent">
<span className="text-2xl font-bold">{Math.round(value)}%</span>
</div>
</div>
);
}