ื›ืคืชื•ืจื™ืื—ื“ืฉ

ื›ืคืชื•ืจ ืžื’ื ื˜ื™

ื”ื›ืคืชื•ืจ ื ืžืฉืš ืœืกืžืŸ ื›ืฉื”ืขื›ื‘ืจ ืงืจื•ื‘ ื•ื—ื•ื–ืจ ื‘ืขื“ื™ื ื•ืช ืœืžืงื•ื. ื‘ืžืกื›ื™ ืžื’ืข ื”ืืคืงื˜ ื ื›ื‘ื” ืžืขืฆืžื•.

ื”ืชืืžื”

color
glowColor
highlightColor

ืžื‘ื•ืกืก ืขืœ Magnetic Button (MIT ืจื™ืฉื™ื•ืŸ) ยท ืชื ืื™ ืฉื™ืžื•ืฉ

ืžืืคื™ื™ื ื™ื

11 ืžืืคื™ื™ื ื™ื
ืžืืคื™ื™ืŸืกื•ื’ื‘ืจื™ืจืช ืžื—ื“ืœืชื™ืื•ืจ
strengthnumber0.3ื›ืžื” ื—ื–ืง ื”ื›ืคืชื•ืจ ื ืžืฉืš ืœืกืžืŸ.
radiusnumber150ื”ืžืจื—ืง ืฉืžืžื ื• ืžืชื—ื™ืœื” ื”ืžืฉื™ื›ื”, ื‘ืคื™ืงืกืœื™ื.
variant'default' | 'secondary' | 'outline' | 'ghost' | 'link' | 'destructive'"default"ืกื’ื ื•ืŸ ื”ื›ืคืชื•ืจ.
size'default' | 'sm' | 'lg' | 'icon'"default"ื’ื•ื“ืœ ื”ื›ืคืชื•ืจ.
disabledbooleanfalseืœื”ืฉื‘ื™ืช ืืช ื”ื›ืคืชื•ืจ ื•ืืช ื”ืืคืงื˜.
springConfig{ duration?: number; bounce?: number }"{ bounce: 0.1, duration: 0.4 }"ื”ื’ื“ืจื•ืช ื”ืงืคื™ืฅ.
asChildbooleanfalseืœื”ืขื‘ื™ืจ ืืช ื”ืกื’ื ื•ืŸ ืœืืœืžื ื˜ ื”ื™ืœื“, ืœืžืฉืœ ืงื™ืฉื•ืจ.
childrenReactNodeโ€”ื˜ืงืกื˜ ื•ืื™ื™ืงื•ืŸ ืฉืœ ื”ื›ืคืชื•ืจ.
colorstring"#ffffff"ืฆื‘ืข ื”ืžื™ืœื•ื™ ืฉืœ ื”ื›ืคืชื•ืจ. ื”ื˜ืงืกื˜ ื”ื•ืคืš ืœื›ื”ื” ืื• ืœื‘ืŸ ืœื‘ื“.
glowColorstring"rgba(255,255,255,0.25)"ื–ื•ื”ืจ ืจืš ืžืชื—ืช ืœื›ืคืชื•ืจ.
highlightColorstring"rgba(255,255,255,0.6)"ื‘ืจืง ื“ืง ืœืื•ืจืš ื”ืงืฆื” ื”ืขืœื™ื•ืŸ.

ืชืœื•ื™ื•ืช

5 ื—ื‘ื™ืœื•ืช ื ื“ืจืฉื•ืช

npm install motion @radix-ui/react-slot class-variance-authority clsx tailwind-merge

ืจื›ื™ื‘ื™ื ื“ื•ืžื™ื

ืœื›ืœ ื”ืจื›ื™ื‘ื™ื