BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/billui/animated-usage-card

Animated Usage Card

billui/animated-usage-card
FreeComponent

An animated version of usage-card with smooth spring animations powered by motion.

Live preview

live · rendered by the registry
Rendered by billui on their own page — this is the component running, not a screenshot of it.

Install it

npx shadcn@latest add https://billui.com/r/animated-usage-card.json

Source

src/registry/animated/animated-usage-card.tsxbillui.com/r/animated-usage-card.json · first 6 KB
1"use client";
2
3import { cva, type VariantProps } from "class-variance-authority";
4import { ChevronDown } from "lucide-react";
5import { motion, useMotionValue, useSpring, useTransform } from "motion/react";
6import * as React from "react";
7import { Button } from "@/components/ui/button";
8import { cn } from "@/lib/utils";
9
10const animatedUsageCardVariants = cva(
11 "relative min-w-[280px] rounded-2xl border bg-card text-card-foreground",
12 {
13 variants: {
14 variant: {
15 default: "border-border",
16 elevated: "border-border shadow-lg",
17 },
18 },
19 defaultVariants: {
20 variant: "default",
21 },
22 },
23);
24
25interface AnimatedUsageCardProps
26 extends VariantProps<typeof animatedUsageCardVariants> {
27 className?: string;
28 children?: React.ReactNode;
29}
30
31const AnimatedUsageCard = React.forwardRef<
32 HTMLDivElement,
33 AnimatedUsageCardProps
34>(({ className, variant, children }, ref) => (
35 <motion.div
36 ref={ref}
37 initial={{ opacity: 0, y: 20, scale: 0.95 }}
38 animate={{ opacity: 1, y: 0, scale: 1 }}
39 transition={{
40 type: "spring",
41 bounce: 0.3,
42 duration: 0.6,
43 }}
44 className={cn(animatedUsageCardVariants({ variant, className }))}
45 >
46 {children}
47 </motion.div>
48));
49AnimatedUsageCard.displayName = "AnimatedUsageCard";
50
51interface AnimatedUsageCardHeaderProps
52 extends React.HTMLAttributes<HTMLDivElement> {}
53
54const AnimatedUsageCardHeader = React.forwardRef<
55 HTMLDivElement,
56 AnimatedUsageCardHeaderProps
57>(({ className, ...props }, ref) => (
58 <div
59 ref={ref}
60 className={cn(
61 "flex items-center justify-between gap-4 p-4 pb-0",
62 className,
63 )}
64 {...props}
65 />
66));
67AnimatedUsageCardHeader.displayName = "AnimatedUsageCardHeader";
68
69interface AnimatedUsageCardPeriodProps
70 extends React.HTMLAttributes<HTMLSpanElement> {
71 daysRemaining?: number;
72}
73
74const AnimatedUsageCardPeriod = React.forwardRef<
75 HTMLSpanElement,
76 AnimatedUsageCardPeriodProps
77>(({ className, daysRemaining, children, ...props }, ref) => (
78 <span
79 ref={ref}
80 className={cn("text-sm font-medium text-foreground", className)}
81 {...props}
82 >
83 {children ??
84 (daysRemaining !== undefined &&
85 `${daysRemaining} days remaining in cycle`)}
86 </span>
87));
88AnimatedUsageCardPeriod.displayName = "AnimatedUsageCardPeriod";
89
90interface AnimatedUsageCardActionProps
91 extends React.ComponentPropsWithoutRef<typeof Button> {}
92
93const AnimatedUsageCardAction = React.forwardRef<
94 HTMLButtonElement,
95// … truncated

What it pulls in

npm packages

  • class-variance-authority
  • lucide-react

Other registry items

  • button
  • https://billui.com/r/utils.json

Files it writes

  • src/registry/animated/animated-usage-card.tsx

Facts

Registry
billui
Type
registry:ui
Access
Free
Files written
1
Licence
MIT
First indexed
2026-08-02
Last confirmed
yesterday

Go to the source

Docs on billui billui.com commet-labs/billui on GitHub Raw registry item This item as JSON

More from billui

All 13 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
Billing Addressbilling-addressbilluiComponentsFreeno deps
Card Iconscard-iconsbilluiComponentsFree1 dep
Card Inputcard-inputbilluiComponentsFreeno deps
Invoice Cardinvoice-cardbilluiComponentsFree2 deps
Payment Methodpayment-methodbilluiComponentsFree2 deps
Plan Cardplan-cardbilluiComponentsFree2 deps
Plan Groupplan-groupbilluiComponentsFree1 dep
Pricing Tablepricing-tablebilluiComponentsFree2 deps
BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex