brand-google-icon
itshover/brand-google-iconFreeComponent
itshover publishes no description for this item.
Install it
npx shadcn@latest add https://itshover.com/r/brand-google-icon.jsonSource
1"use client";2import { forwardRef, useImperativeHandle } from "react";3import type { AnimatedIconHandle, AnimatedIconProps } from "./types";4import { motion, useAnimate } from "motion/react";56const BrandGoogleIcon = forwardRef<AnimatedIconHandle, AnimatedIconProps>(7 ({ size = 24, color = "currentColor", className = "" }, ref) => {8 const [scope, animate] = useAnimate();910 const start = async () => {11 await animate(12 ".google-g",13 {14 rotate: [0, -10, 10, -5, 0],15 scale: [1, 1.05, 1],16 },17 {18 duration: 0.6,19 ease: "easeInOut",20 },21 );22 };2324 const stop = async () => {25 animate(26 ".google-g",27 {28 rotate: 0,29 scale: 1,30 },31 {32 duration: 0.3,33 ease: "easeInOut",34 },35 );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 xmlns="http://www.w3.org/2000/svg"57 width={size}58 height={size}59 viewBox="0 0 24 24"60 fill={color}61 className={`cursor-pointer ${className}`}62 onHoverStart={handleHoverStart}63 onHoverEnd={handleHoverEnd}64 >65 <path stroke="none" d="M0 0h24v24H0z" fill="none" />6667 <motion.path68 d="M12 2a9.96 9.96 0 0 1 6.29 2.226a1 1 0 0 1 .04 1.52l-1.51 1.362a1 1 0 0 1 -1.265 .06a6 6 0 1 0 2.103 6.836l.001 -.004h-3.66a1 1 0 0 1 -.992 -.883l-.007 -.117v-2a1 1 0 0 1 1 -1h6.945a1 1 0 0 1 .994 .89c.04 .367 .061 .737 .061 1.11c0 5.523 -4.477 10 -10 10s-10 -4.477 -10 -10s4.477 -10 10 -10z"69 className="google-g"70 style={{ transformOrigin: "50% 50%" }}71 />72 </motion.svg>73 );74 },75);7677BrandGoogleIcon.displayName = "BrandGoogleIcon";7879export default BrandGoogleIcon;
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 |
