Customize
Count34
Min size12
Max size25
Gravity0.35
Bounciness0.75
Spawn interval180
Installation
pnpm dlx shadcn@latest add @clover-ui/token-fallUsage
import { TokenFall } from "@/components/token-fall";
<div className="relative h-72 w-full overflow-hidden rounded-2xl">
<TokenFall count={34} minSize={12} maxSize={25} />
</div>It fills its parent, so give the parent a position and a height. Move your cursor near the tokens to push them away.
Props
PropType
Default
55Default
14Default
28Color pairs picked at random for each token.
Draw your own token instead of the coin.
Default
0.35Bounciness, from 0 to 1.
Default
0.75Default
150Default
0.0015Milliseconds between new tokens.
Default
180