brand-react-native-icon
itshover/brand-react-native-iconFreeComponent
itshover publishes no description for this item.
Install it
npx shadcn@latest add https://itshover.com/r/brand-react-native-icon.jsonSource
1import { forwardRef, useImperativeHandle, useRef } from "react";2import { motion, useAnimate } from "motion/react";3import type { AnimatedIconHandle, AnimatedIconProps } from "./types";45const BrandReactNativeIcon = forwardRef<AnimatedIconHandle, AnimatedIconProps>(6 (7 { size = 24, color = "currentColor", strokeWidth = 2, className = "" },8 ref,9 ) => {10 const [scope, animate] = useAnimate();11 const animationControls = useRef<Array<ReturnType<typeof animate>>>([]);1213 const start = async () => {14 // Clear any existing animations15 animationControls.current.forEach((control) => control.stop());16 animationControls.current = [];1718 // Smooth pop entrance19 await animate(20 ".orbit-system",21 { scale: [0.95, 1.02, 1] },22 { duration: 0.4, ease: [0.34, 1.56, 0.64, 1] },23 );2425 // Center dot gentle pulse26 animationControls.current.push(27 animate(28 ".center-dot",29 {30 scale: [1, 1.3, 1],31 opacity: [1, 0.8, 1],32 },33 {34 duration: 2.5,35 ease: "easeInOut",36 repeat: Infinity,37 },38 ),39 );4041 // Smooth continuous rotation42 animationControls.current.push(43 animate(44 ".orbit-system",45 { rotate: 360 },46 {47 duration: 20,48 ease: "linear",49 repeat: Infinity,50 },51 ),52 );5354 // Subtle wave through rings55 const rings = [".ring-1", ".ring-2", ".ring-3"];56 rings.forEach((ring, i) => {57 animationControls.current.push(58 animate(59 ring,60 {61 opacity: [1, 0.7, 1],62 },63 {64 duration: 3,65 ease: "easeInOut",66 repeat: Infinity,67 delay: i * 1,68 },69 ),70 );71 });72 };7374 const stop = () => {75 // Cancel all infinite animations76 animationControls.current.forEach((control) => control.stop());77 animationControls.current = [];7879 animate(80 ".orbit-system",81 { rotate: 0, scale: 1 },82 { duration: 0.6, ease: [0.34, 1.56, 0.64, 1] },83 );8485 animate(".ring-1, .ring-2, .ring-3", { opacity: 1 }, { duration: 0.3 });8687 animate(".center-dot", { scale: 1, opacity: 1 }, { duration: 0.3 });88 };8990 useImperativeHandle(ref, () => ({91 startAnimation: start,92 stopAnimation: stop,93 }));9495// … 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 |
