annoyed
lucide-animated-pqoqubbw/annoyedFreeComponent
lucide-animated publishes no description for this item.
Install it
npx shadcn@latest add https://lucide-animated.com/r/annoyed.jsonSource
1"use client";23import type { Variants } from "motion/react";4import { motion, useAnimation } from "motion/react";5import type { HTMLAttributes } from "react";6import { forwardRef, useCallback, useImperativeHandle, useRef } from "react";78import { cn } from "@/lib/utils";910export interface AnnoyedIconHandle {11 startAnimation: () => void;12 stopAnimation: () => void;13}1415interface AnnoyedIconProps extends HTMLAttributes<HTMLDivElement> {16 size?: number;17}1819const AnnoyedIcon = forwardRef<AnnoyedIconHandle, AnnoyedIconProps>(20 ({ onMouseEnter, onMouseLeave, className, size = 28, ...props }, ref) => {21 const controls = useAnimation();22 const isControlledRef = useRef(false);2324 useImperativeHandle(ref, () => {25 isControlledRef.current = true;26 return {27 startAnimation: () => controls.start("animate"),28 stopAnimation: () => controls.start("normal"),29 };30 });3132 const handleMouseEnter = useCallback(33 (e: React.MouseEvent<HTMLDivElement>) => {34 if (!isControlledRef.current) controls.start("animate");35 onMouseEnter?.(e);36 },37 [controls, onMouseEnter]38 );3940 const handleMouseLeave = useCallback(41 (e: React.MouseEvent<HTMLDivElement>) => {42 if (!isControlledRef.current) controls.start("normal");43 onMouseLeave?.(e);44 },45 [controls, onMouseLeave]46 );4748 const faceVariants: Variants = {49 normal: {50 scale: 1,51 transition: { duration: 0.2, ease: "easeOut" },52 },53 animate: {54 scale: 1.05,55 transition: {56 duration: 0.3,57 ease: "easeOut",58 },59 },60 };6162 const mouthVariants: Variants = {63 normal: {64 scaleX: 1,65 y: 0,66 transition: { duration: 0.2, ease: "easeOut" },67 },68 animate: {69 scaleX: 0.8,70 y: 1,71 transition: {72 duration: 0.3,73 ease: "easeOut",74 },75 },76 };7778 const leftEyebrowVariants: Variants = {79 normal: {80 rotate: 0,81 y: 0,82 x: 0,83 transition: { duration: 0.2, ease: "easeOut" },84 },85 animate: {86 rotate: 15,87 y: -1,88 x: -0.5,89 transition: {90 duration: 0.25,91 ease: "easeOut",92 },93 },94 };9596 const rightEyebrowVariants: Variants = {97 normal: {98 rotate: 0,99 y: 0,100 x: 0,101 transition: { duration: 0.2, ease: "easeOut" },102 },103 animate: {104// … truncated
What it pulls in
npm packages
Files it writes
More from lucide-animated
All 464 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| a-arrow-downa-arrow-down | lucide-animated | Components | Free | 1 dep | |
| a-arrow-upa-arrow-up | lucide-animated | Components | Free | 1 dep | |
| accessibilityaccessibility | lucide-animated | Components | Free | 1 dep | |
| activityactivity | lucide-animated | Components | Free | 1 dep | |
| air-ventair-vent | lucide-animated | Components | Free | 1 dep | |
| airplaneairplane | lucide-animated | Components | Free | 1 dep | |
| airplayairplay | lucide-animated | Components | Free | 1 dep | |
| alarm-clockalarm-clock | lucide-animated | Components | Free | 1 dep |
