bell-off-icon
itshover/bell-off-iconFreeComponent
itshover publishes no description for this item.
Install it
npx shadcn@latest add https://itshover.com/r/bell-off-icon.jsonSource
1import { forwardRef, useImperativeHandle } from "react";2import type { AnimatedIconHandle, AnimatedIconProps } from "./types";3import { motion, useAnimate } from "motion/react";45const BellOffIcon = 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 animate(14 ".bell",15 { x: [-1, 1, -1, 1, 0] },16 { duration: 0.4, ease: "easeInOut" },17 );18 await animate(19 ".slash",20 { pathLength: [0, 1], opacity: [0, 1] },21 { duration: 0.5, ease: "easeOut" },22 );23 };2425 const stop = () => {26 animate(".slash", { pathLength: 1, opacity: 1 }, { duration: 0.2 });27 };2829 useImperativeHandle(ref, () => {30 return {31 startAnimation: start,32 stopAnimation: stop,33 };34 });3536 const handleHoverStart = () => {37 start();38 };3940 const handleHoverEnd = () => {41 stop();42 };4344 return (45 <motion.svg46 ref={scope}47 onHoverStart={handleHoverStart}48 onHoverEnd={handleHoverEnd}49 xmlns="http://www.w3.org/2000/svg"50 width={size}51 height={size}52 viewBox="0 0 24 24"53 fill="none"54 stroke={color}55 strokeWidth={strokeWidth}56 strokeLinecap="round"57 strokeLinejoin="round"58 className={`cursor-pointer ${className}`}59 >60 <motion.path className="bell" d="M10.268 21a2 2 0 0 0 3.464 0" />61 <motion.path62 className="bell"63 d="M17 17H4a1 1 0 0 1-.74-1.673C4.59 13.956 6 12.499 6 8a6 6 0 0 1 .258-1.742"64 />65 <motion.path66 className="slash"67 d="m2 2 20 20"68 initial={{ pathLength: 1, opacity: 1 }}69 />70 <motion.path71 className="bell"72 d="M8.668 3.01A6 6 0 0 1 18 8c0 2.687.77 4.653 1.707 6.05"73 />74 </motion.svg>75 );76 },77);7879BellOffIcon.displayName = "BellOffIcon";8081export default BellOffIcon;
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 |
