An animated system monitor card that displays a title, percentage, and neon-lit pill indicators driven by Motion.
Install
Add it to your project
Run this in a project set up for shadcn/ui. It writes the files and installs the npm packages.
First time: connect the Infinity UI registry
- Create a personal token on your Tokens page.
- Put it in
.env.localasINFINITYUI_TOKEN. - Add the registry to
components.json:
{
"registries": {
"@infinityui": {
"url": "https://infinityui.io/r/{name}.json",
"headers": {
"Authorization": "Bearer ${INFINITYUI_TOKEN}"
}
}
}
}Using Claude Code, Codex, Cursor, Lovable or v0? See CLI & MCP for a setup prompt.
npm packages it adds
- react
- motion
Code
"use client"
import { useEffect, useState } from "react"
import { IconCpu } from "@tabler/icons-react"
import UsageCard from "@/registry/gammaui/usage-card"
const UsageCardDemo = () => {
const [cpuVal, setCpuVal] = useState(72)
useEffect(() => {
const id = setInterval(() => {
setCpuVal((v) =>
Math.min(100, Math.max(0, v + (Math.random() - 0.5) * 10))
)
}, 2000)
return () => clearInterval(id)
}, [])
return (
<div className="h-full">
<UsageCard
title="CPU"
percentage={Math.round(cpuVal)}
pillCount={20}
accentColor="#00f5ff"
icon={<IconCpu size={13} />}
/>
</div>
)
}
export default UsageCardDemo
































