Installation
How to install dependencies and organize your app structure.
Note: Follows the same installation steps as shadcn/ui
Run the init (with default options) command to create a new Next.js project or set up an existing one:
npx shadcn@latest init{
...
"registries": {
"@nhatcapdang": "https://ui.nhatcapdang.com/r/{name}.json"
}
}You’re ready to start adding components to your project
npx shadcn@latest add @nhatcapdang/animated-numberThe command above will add the AnimatedNumber component to your project. You can then import it using the following syntax:
import { AnimatedNumber } from "@/components/nhatcapdang/animated-number"
export default function Home() {
return (
<AnimatedNumber
value={100}
springOptions={{
stiffness: 50,
damping: 20,
}}
/>
)
}