arrow-down-0-1-icon
itshover/arrow-down-0-1-iconFreeComponent
itshover publishes no description for this item.
Install it
npx shadcn@latest add https://itshover.com/r/arrow-down-0-1-icon.jsonSource
1import { forwardRef, useImperativeHandle } from "react";2import type { AnimatedIconHandle, AnimatedIconProps } from "./types";3import { motion, useAnimate } from "motion/react";45const ArrowDown01Icon = forwardRef<AnimatedIconHandle, AnimatedIconProps>(6 (7 { size = 40, className = "", color = "currentColor", strokeWidth = 2 },8 ref,9 ) => {10 const [scope, animate] = useAnimate();1112 const swapDistance = 10;1314 const start = async () => {15 animate(16 ".zero",17 { y: swapDistance },18 { duration: 0.3, ease: "easeInOut" },19 );20 animate(21 ".one",22 { y: -swapDistance },23 { duration: 0.3, ease: "easeInOut" },24 );25 };2627 const stop = async () => {28 animate(".zero, .one", { y: 0 }, { duration: 0.3, ease: "easeInOut" });29 };3031 useImperativeHandle(ref, () => {32 return {33 startAnimation: start,34 stopAnimation: stop,35 };36 });3738 const handleHoverStart = () => {39 start();40 };4142 const handleHoverEnd = () => {43 stop();44 };4546 return (47 <motion.svg48 ref={scope}49 onHoverStart={handleHoverStart}50 onHoverEnd={handleHoverEnd}51 xmlns="http://www.w3.org/2000/svg"52 width={size}53 height={size}54 viewBox="0 0 24 24"55 fill="none"56 stroke="currentColor"57 strokeWidth={strokeWidth}58 strokeLinecap="round"59 strokeLinejoin="round"60 color={color}61 className={`cursor-pointer ${className}`}62 >63 <path d="m3 16 4 4 4-4" />64 <path d="M7 20V4" />65 <motion.rect66 className="zero"67 x="15"68 y="4"69 width="4"70 height="6"71 ry="2"72 />73 <motion.g className="one">74 <path d="M17 20v-6h-2" />75 <path d="M15 20h4" />76 </motion.g>77 </motion.svg>78 );79 },80);8182ArrowDown01Icon.displayName = "ArrowDown01Icon";8384export default ArrowDown01Icon;
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 |
