arrow-down-1-0-icon
itshover/arrow-down-1-0-iconFreeComponent
itshover publishes no description for this item.
Install it
npx shadcn@latest add https://itshover.com/r/arrow-down-1-0-icon.jsonSource
1import { forwardRef, useImperativeHandle } from "react";2import type { AnimatedIconHandle, AnimatedIconProps } from "./types";3import { motion, useAnimate } from "motion/react";45const ArrowDown10Icon = forwardRef<AnimatedIconHandle, AnimatedIconProps>(6 (7 { size = 24, color = "currentColor", strokeWidth = 2, className = "" },8 ref,9 ) => {10 const [scope, animate] = useAnimate();1112 const swapDistance = 10;1314 const start = async () => {15 animate(16 ".one",17 { y: swapDistance },18 { duration: 0.3, ease: "easeInOut" },19 );20 animate(21 ".zero",22 { y: -swapDistance },23 { duration: 0.3, ease: "easeInOut" },24 );25 };2627 const stop = async () => {28 animate(".one, .zero", { 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={color}57 strokeWidth={strokeWidth}58 strokeLinecap="round"59 strokeLinejoin="round"60 className={`cursor-pointer ${className}`}61 >62 <path d="m3 16 4 4 4-4" />63 <path d="M7 20V4" />64 <motion.g className="one">65 <path d="M17 10V4h-2" />66 <path d="M15 10h4" />67 </motion.g>68 <motion.rect69 className="zero"70 x="15"71 y="14"72 width="4"73 height="6"74 ry="2"75 />76 </motion.svg>77 );78 },79);8081ArrowDown10Icon.displayName = "ArrowDown10Icon";8283export default ArrowDown10Icon;
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 |
