Apple Activity Card
kokonut-ui/apple-activity-cardFreeComponent
Inspired by Apple activity app.
Live preview
live · rendered by the registry
Rendered by kokonut-ui on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://kokonutui.com/r/apple-activity-card.jsonSource
1"use client";23/**4 * @author: @kokonutui5 * @description: Apple Activity Card6 * @version: 1.0.07 * @date: 2025-06-268 * @license: MIT9 * @website: https://kokonutui.com10 * @github: https://github.com/kokonut-labs/kokonutui11 */1213import { motion } from "motion/react";14import { cn } from "@/lib/utils";1516interface ActivityData {17 label: string;18 value: number;19 color: string;20 size: number;21 current: number;22 target: number;23 unit: string;24}2526interface CircleProgressProps {27 data: ActivityData;28 index: number;29}3031const activities: ActivityData[] = [32 {33 label: "MOVE",34 value: 85,35 color: "#FF2D55",36 size: 200,37 current: 479,38 target: 800,39 unit: "CAL",40 },41 {42 label: "EXERCISE",43 value: 60,44 color: "#A3F900",45 size: 160,46 current: 24,47 target: 30,48 unit: "MIN",49 },50 {51 label: "STAND",52 value: 30,53 color: "#04C7DD",54 size: 120,55 current: 6,56 target: 12,57 unit: "HR",58 },59];6061const CircleProgress = ({ data, index }: CircleProgressProps) => {62 const strokeWidth = 16;63 const radius = (data.size - strokeWidth) / 2;64 const circumference = radius * 2 * Math.PI;65 const progress = ((100 - data.value) / 100) * circumference;6667 const gradientId = `gradient-${data.label.toLowerCase()}`;68 const gradientUrl = `url(#${gradientId})`;6970 return (71 <motion.div72 animate={{ opacity: 1, scale: 1 }}73 className="absolute inset-0 flex items-center justify-center"74 initial={{ opacity: 0, scale: 0.8 }}75 transition={{ duration: 0.8, delay: index * 0.2, ease: "easeOut" }}76 >77 <div className="relative">78 <svg79 aria-label={`${data.label} Activity Progress - ${data.value}%`}80 className="-rotate-90 transform"81 height={data.size}82 viewBox={`0 0 ${data.size} ${data.size}`}83 width={data.size}84 >85 <title>{`${data.label} Activity Progress - ${data.value}%`}</title>8687 <defs>88 <linearGradient id={gradientId} x1="0%" x2="100%" y1="0%" y2="100%">89 <stop90 offset="0%"91 style={{92 stopColor: data.color,93 stopOpacity: 1,94 }}95 />96 <stop97 offset="100%"98 style={{99 stopColor:100 data.color === "#FF2D55"101 ? "#FF6B8B"102 : data.color === "#A3F900"103 ? "#C5FF4D"104// … truncated
What it pulls in
npm packages
Files it writes
More from kokonut-ui
All 40 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Action Search Baraction-search-bar | kokonut-ui | Components | Free | 2 deps · 2 files | |
| AI Input Searchai-input-search | kokonut-ui | Components | Free | 1 dep · 2 files | |
| AI State Loadingai-loading | kokonut-ui | Components | Free | 1 dep | |
| AI Input Selectorai-prompt | kokonut-ui | Components | Free | 2 deps · 4 files | |
| AI Text Loadingai-text-loading | kokonut-ui | Components | Free | 1 dep | |
| AI Voiceai-voice | kokonut-ui | Components | Free | 2 deps | |
| Magnet Buttonattract-button | kokonut-ui | Components | Free | 2 deps | |
| Avatar Pickeravatar-picker | kokonut-ui | Components | Free | 2 deps |
