at-sign-icon
itshover/at-sign-iconFreeComponent
itshover publishes no description for this item.
Install it
npx shadcn@latest add https://itshover.com/r/at-sign-icon.jsonSource
1import { forwardRef, useImperativeHandle } from "react";2import type { AnimatedIconHandle, AnimatedIconProps } from "./types";3import { motion, useAnimate } from "motion/react";45const AtSignIcon = 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(".draw", { pathLength: 0, opacity: 0 }, { duration: 0 });1415 await animate(16 ".outer",17 { pathLength: [0, 1], opacity: [0, 1] },18 { duration: 0.45, ease: "easeOut" },19 );2021 await animate(22 ".path",23 { pathLength: [0, 1], opacity: [0, 1] },24 { duration: 0.6, ease: "easeOut" },25 );2627 animate(28 ".inner",29 { pathLength: [0, 1], opacity: [0, 1] },30 { duration: 0.3, ease: "easeOut" },31 );32 };3334 const stop = () => {35 animate(".draw", { pathLength: 1, opacity: 1 }, { duration: 0.2 });36 };3738 useImperativeHandle(ref, () => {39 return {40 startAnimation: start,41 stopAnimation: stop,42 };43 });4445 const handleHoverStart = () => {46 start();47 };4849 const handleHoverEnd = () => {50 stop();51 };5253 return (54 <motion.svg55 ref={scope}56 onHoverStart={handleHoverStart}57 onHoverEnd={handleHoverEnd}58 xmlns="http://www.w3.org/2000/svg"59 width={size}60 height={size}61 viewBox="0 0 24 24"62 fill="none"63 stroke={color}64 strokeWidth={strokeWidth}65 strokeLinecap="round"66 strokeLinejoin="round"67 className={`cursor-pointer ${className}`}68 >69 <motion.circle70 className="draw inner"71 cx="12"72 cy="12"73 r="4"74 initial={{ pathLength: 1, opacity: 1 }}75 />76 <motion.path77 className="draw path"78 d="M16 8v5a3 3 0 0 0 6 0v-1a10 10 0 1 0-4 8"79 initial={{ pathLength: 1, opacity: 1 }}80 />81 <motion.circle82 className="draw outer"83 cx="12"84 cy="12"85 r="10"86 initial={{ pathLength: 1, opacity: 1 }}87 />88 </motion.svg>89 );90 },91);9293AtSignIcon.displayName = "AtSignIcon";9495export default AtSignIcon;
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 | |
| angry-iconangry-icon | itshover | Components | Free | 1 dep · 2 files |
