angry-icon
itshover/angry-iconFreeComponent
itshover publishes no description for this item.
Install it
npx shadcn@latest add https://itshover.com/r/angry-icon.jsonSource
1import { forwardRef, useImperativeHandle } from "react";2import type { AnimatedIconHandle, AnimatedIconProps } from "./types";3import { motion, useAnimate } from "motion/react";45const AngryIcon = forwardRef<AnimatedIconHandle, AnimatedIconProps>(6 (7 { size = 24, color = "currentColor", strokeWidth = 2, className = "" },8 ref,9 ) => {10 const [scope, animate] = useAnimate();1112 const start = async () => {13 animate(14 ".eyebrows",15 { y: 1, scaleY: 1.2 },16 { duration: 0.3, ease: "easeOut" },17 );18 animate(".mouth", { scaleY: 1.2 }, { duration: 0.3, ease: "easeOut" });19 animate(".eyes", { scale: 0.8 }, { duration: 0.3, ease: "easeOut" });20 };2122 const stop = () => {23 animate(24 ".eyebrows",25 { y: 0, scaleY: 1 },26 { duration: 0.2, ease: "easeInOut" },27 );28 animate(".mouth", { scaleY: 1 }, { duration: 0.2, ease: "easeInOut" });29 animate(".eyes", { scale: 1 }, { duration: 0.2, ease: "easeInOut" });30 };3132 useImperativeHandle(ref, () => {33 return {34 startAnimation: start,35 stopAnimation: stop,36 };37 });3839 const handleHoverStart = () => {40 start();41 };4243 const handleHoverEnd = () => {44 stop();45 };4647 return (48 <motion.svg49 ref={scope}50 onHoverStart={handleHoverStart}51 onHoverEnd={handleHoverEnd}52 xmlns="http://www.w3.org/2000/svg"53 width={size}54 height={size}55 viewBox="0 0 24 24"56 fill="none"57 stroke={color}58 strokeWidth={strokeWidth}59 strokeLinecap="round"60 strokeLinejoin="round"61 className={`cursor-pointer ${className}`}62 >63 <circle cx="12" cy="12" r="10" />64 <motion.path65 className="mouth"66 style={{ transformOrigin: "12px 16px" }}67 d="M16 16s-1.5-2-4-2-4 2-4 2"68 />69 <motion.g className="eyebrows">70 <path d="M7.5 8 10 9" />71 <path d="m14 9 2.5-1" />72 </motion.g>73 <motion.g className="eyes">74 <path d="M9 10h.01" />75 <path d="M15 10h.01" />76 </motion.g>77 </motion.svg>78 );79 },80);8182AngryIcon.displayName = "AngryIcon";8384export default AngryIcon;
What it pulls in
npm packages
Files it writes
More from itshover
All 263 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| accessibility-iconaccessibility-icon | itshover | Components | Free | 1 dep · 2 files | |
| airplane-iconairplane-icon | itshover | Components | Free | 1 dep · 2 files | |
| alarm-clock-plus-iconalarm-clock-plus-icon | itshover | Components | Free | 1 dep · 2 files | |
| align-center-iconalign-center-icon | itshover | Components | Free | 1 dep · 2 files | |
| align-vertical-space-around-iconalign-vertical-space-around-icon | itshover | Components | Free | 1 dep · 2 files | |
| ambulance-iconambulance-icon | itshover | Components | Free | 1 dep · 2 files | |
| ampersand-iconampersand-icon | itshover | Components | Free | 1 dep · 2 files | |
| annoyed-iconannoyed-icon | itshover | Components | Free | 1 dep · 2 files |
