brain-circuit-icon
itshover/brain-circuit-iconFreeComponent
itshover publishes no description for this item.
Install it
npx shadcn@latest add https://itshover.com/r/brain-circuit-icon.jsonSource
1"use strict";23import { forwardRef, useImperativeHandle, useCallback } from "react";4import type { AnimatedIconHandle, AnimatedIconProps } from "./types";5import { motion, useAnimate } from "motion/react";67const BrainCircuitIcon = forwardRef<AnimatedIconHandle, AnimatedIconProps>(8 (9 { size = 24, color = "currentColor", strokeWidth = 2, className = "" },10 ref,11 ) => {12 const [scope, animate] = useAnimate();1314 const startAnimation = useCallback(() => {15 // Brain outline subtle pulse16 animate(17 ".brain-outline",18 { opacity: [1, 0.7, 1] },19 { duration: 2, repeat: Infinity, ease: "easeInOut" },20 );2122 // Circuit lines drawing23 animate(24 ".circuit-line",25 { pathLength: [0, 1], opacity: [0, 1] },26 { duration: 0.6, ease: "easeOut" },27 );2829 // Synaptic terminals pulsing in sequence30 const terminals = [31 ".terminal-1",32 ".terminal-2",33 ".terminal-3",34 ".terminal-4",35 ];36 terminals.forEach((selector, index) => {37 animate(38 selector,39 { scale: [1, 1.5, 1], opacity: [0.5, 1, 0.5] },40 {41 duration: 0.8,42 delay: 0.2 + index * 0.15,43 repeat: Infinity,44 repeatDelay: 1,45 ease: "easeInOut",46 },47 );48 });49 }, [animate]);5051 const stopAnimation = useCallback(() => {52 animate(".brain-outline", { opacity: 1 }, { duration: 0.3 });53 animate(54 ".circuit-line",55 { pathLength: 1, opacity: 1 },56 { duration: 0.3 },57 );58 animate(".terminal", { scale: 1, opacity: 1 }, { duration: 0.3 });59 }, [animate]);6061 useImperativeHandle(ref, () => ({62 startAnimation,63 stopAnimation,64 }));6566 return (67 <div68 className={`relative flex items-center justify-center ${className}`}69 onMouseEnter={startAnimation}70 onMouseLeave={stopAnimation}71 >72 <motion.svg73 ref={scope}74 xmlns="http://www.w3.org/2000/svg"75 width={size}76 height={size}77 viewBox="0 0 24 24"78 fill="none"79 stroke={color}80 strokeWidth={strokeWidth}81 strokeLinecap="round"82 strokeLinejoin="round"83 >84 <motion.path85 className="brain-outline"86 d="M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z"87 />88// … 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 |
