apple-brand-logo
itshover/apple-brand-logoFreeComponent
itshover publishes no description for this item.
Install it
npx shadcn@latest add https://itshover.com/r/apple-brand-logo.jsonSource
1"use client";23import { forwardRef, useImperativeHandle } from "react";4import type { AnimatedIconHandle, AnimatedIconProps } from "./types";5import { motion, useAnimate } from "motion/react";67const AppleBrandLogo = forwardRef<AnimatedIconHandle, AnimatedIconProps>(8 (9 { size = 24, color = "currentColor", strokeWidth = 2, className = "" },10 ref,11 ) => {12 const [scope, animate] = useAnimate();1314 const start = async () => {15 animate(16 ".apple-leaf",17 {18 rotate: [0, -15, 10, -5, 0],19 scale: [1, 1.1, 1],20 },21 {22 duration: 0.6,23 ease: "easeInOut",24 },25 );2627 await animate(28 ".apple-body",29 {30 scale: [1, 1.05, 1],31 },32 {33 duration: 0.4,34 ease: "easeOut",35 },36 );37 };3839 const stop = async () => {40 animate(41 ".apple-leaf",42 {43 rotate: 0,44 scale: 1,45 },46 {47 duration: 0.3,48 ease: "easeInOut",49 },50 );5152 animate(53 ".apple-body",54 {55 scale: 1,56 },57 {58 duration: 0.2,59 ease: "easeOut",60 },61 );62 };6364 useImperativeHandle(ref, () => {65 return {66 startAnimation: start,67 stopAnimation: stop,68 };69 });7071 const handleHoverStart = () => {72 start();73 };7475 const handleHoverEnd = () => {76 stop();77 };7879 return (80 <motion.svg81 ref={scope}82 xmlns="http://www.w3.org/2000/svg"83 width={size}84 height={size}85 viewBox="0 0 24 24"86 fill="none"87 stroke={color}88 strokeWidth={strokeWidth}89 strokeLinecap="round"90 strokeLinejoin="round"91 className={`cursor-pointer ${className}`}92 onHoverStart={handleHoverStart}93 onHoverEnd={handleHoverEnd}94 >95 <path stroke="none" d="M0 0h24v24H0z" fill="none" />9697 <motion.path98 d="M8.286 7.008c-3.216 0 -4.286 3.23 -4.286 5.92c0 3.229 2.143 8.072 4.286 8.072c1.165 -.05 1.799 -.538 3.214 -.538c1.406 0 1.607 .538 3.214 .538s4.286 -3.229 4.286 -5.381c-.03 -.011 -2.649 -.434 -2.679 -3.23c-.02 -2.335 2.589 -3.179 2.679 -3.228c-1.096 -1.606 -3.162 -2.113 -3.75 -2.153c-1.535 -.12 -3.032 1.077 -3.75 1.077c-.729 0 -2.036 -1.077 -3.214 -1.077z"99 className="apple-body"100 style={{ transformOrigin: "50% 50%" }}101 />102103 <motion.path104// … truncated
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 |
