brand-telegram-icon
itshover/brand-telegram-iconFreeComponent
itshover publishes no description for this item.
Install it
npx shadcn@latest add https://itshover.com/r/brand-telegram-icon.jsonSource
1import { forwardRef, useImperativeHandle } from "react";2import type { AnimatedIconHandle, AnimatedIconProps } from "./types";3import { motion, useAnimate } from "motion/react";45const BrandTelegramIcon = 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 ".plane",15 { x: [0, 10, -10, 0], y: [0, -10, 10, 0], opacity: [1, 0, 0, 1] },16 { duration: 1, times: [0, 0.4, 0.5, 1], ease: "easeInOut" },17 );18 };1920 const stop = () => {21 animate(".plane", { x: 0, y: 0, opacity: 1 });22 };2324 useImperativeHandle(ref, () => {25 return {26 startAnimation: start,27 stopAnimation: stop,28 };29 });3031 const handleHoverStart = () => {32 start();33 };3435 const handleHoverEnd = () => {36 stop();37 };3839 return (40 <motion.svg41 ref={scope}42 onHoverStart={handleHoverStart}43 onHoverEnd={handleHoverEnd}44 xmlns="http://www.w3.org/2000/svg"45 width={size}46 height={size}47 viewBox="0 0 24 24"48 fill="none"49 stroke={color}50 strokeWidth={strokeWidth}51 strokeLinecap="round"52 strokeLinejoin="round"53 className={`cursor-pointer ${className}`}54 >55 <path stroke="none" d="M0 0h24v24H0z" fill="none" />56 <motion.path57 className="plane"58 d="M15 10l-4 4l6 6l4 -16l-18 7l4 2l2 6l3 -4"59 />60 </motion.svg>61 );62 },63);6465BrandTelegramIcon.displayName = "BrandTelegramIcon";6667export default BrandTelegramIcon;
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 |
