Troll Button
Troll Button: Playful button that evasively dodges the cursor until exhausting stamina, finally surrendering to be clicked. Free MIT React & Next.js source with Motion and Tailwind CSS, live preview, CLI install and docs.
Install Troll Button
npx motion-ui-skill add troll-buttonComponents install as source into your project. The interactive page also includes preview, code, documentation and install tabs.
Dependencies
clsxmotionreacttailwind-merge
Source files
Troll Button
Playful button that evasively dodges the cursor until exhausting stamina, finally surrendering to be clicked.
Install
npx motion-ui-skill add troll-button
Dependencies
clsxmotionreacttailwind-merge
Usage
"use client";
import { TrollButton } from "@/components/buttons/troll-button";
export function TrollButtonDemo() {
return (
<div className="flex items-center justify-center p-6">
<TrollButton>Click Me</TrollButton>
</div>
);
}
API Reference
TrollButton
| Prop | Type | Default | Required | Description |
|---|---|---|---|---|
stamina |
number |
5 | No | Number of evasion hops before surrendering |
className |
string |
— | No | Additional CSS classes |
children |
React.ReactNode |
— | No | Button label content |