brand-nextjs-icon
itshover/brand-nextjs-iconFreeComponent
itshover publishes no description for this item.
Install it
npx shadcn@latest add https://itshover.com/r/brand-nextjs-icon.jsonSource
1import { forwardRef, useImperativeHandle } from "react";2import type { AnimatedIconHandle, AnimatedIconProps } from "./types";3import { motion, useAnimate } from "motion/react";45const BrandNextjsIcon = 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 await animate(".circle", { pathLength: 0, opacity: 0 }, { duration: 0 });14 await animate(".line", { pathLength: 0, opacity: 0 }, { duration: 0 });1516 await animate(17 ".circle",18 { pathLength: [0, 1], opacity: [0, 1] },19 { duration: 1.5 },20 );2122 await animate(23 ".line",24 { pathLength: [0, 1], opacity: [0, 1] },25 { duration: 0.4 },26 );27 };2829 const stop = () => {30 animate(".circle", { pathLength: 1, opacity: 1 }, { duration: 0.2 });31 animate(".line", { pathLength: 1, opacity: 1 }, { duration: 0.2 });32 };3334 useImperativeHandle(ref, () => {35 return {36 startAnimation: start,37 stopAnimation: stop,38 };39 });4041 const handleHoverStart = () => {42 start();43 };4445 const handleHoverEnd = () => {46 stop();47 };4849 return (50 <svg51 ref={scope}52 onMouseEnter={handleHoverStart}53 onMouseLeave={handleHoverEnd}54 xmlns="http://www.w3.org/2000/svg"55 width={size}56 height={size}57 viewBox="0 0 24 24"58 fill="none"59 stroke={color}60 strokeWidth={strokeWidth}61 strokeLinecap="round"62 strokeLinejoin="round"63 className={`icon icon-tabler icons-tabler-outline icon-tabler-brand-nextjs cursor-pointer ${className}`}64 >65 <path stroke="none" d="M0 0h24v24H0z" fill="none" />66 <motion.path67 className="circle"68 d="M9 15v-6l7.745 10.65a9 9 0 1 1 2.255 -1.993"69 initial={{ pathLength: 1, opacity: 1 }}70 />71 <motion.path72 className="line"73 d="M15 12v-3"74 initial={{ pathLength: 1, opacity: 1 }}75 />76 </svg>77 );78 },79);8081BrandNextjsIcon.displayName = "BrandNextjsIcon";8283export default BrandNextjsIcon;
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 |
