brightness-down-icon
itshover/brightness-down-iconFreeComponent
itshover publishes no description for this item.
Install it
npx shadcn@latest add https://itshover.com/r/brightness-down-icon.jsonSource
1import { forwardRef, useImperativeHandle } from "react";2import type { AnimatedIconHandle, AnimatedIconProps } from "./types";3import { motion, useAnimate } from "motion/react";45const BrightnessDownIcon = 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 ".sun-center",15 { scale: [1, 0.8, 1] },16 { duration: 0.4, ease: "easeInOut" },17 );18 animate(19 ".sun-rays",20 { opacity: [1, 0.4, 1] },21 { duration: 0.5, ease: "easeInOut" },22 );23 };2425 const stop = () => {26 animate(".sun-center", { scale: 1 }, { duration: 0.2, ease: "easeOut" });27 animate(".sun-rays", { opacity: 1 }, { duration: 0.2, ease: "easeOut" });28 };2930 useImperativeHandle(ref, () => {31 return {32 startAnimation: start,33 stopAnimation: stop,34 };35 });3637 const handleHoverStart = () => {38 start();39 };4041 const handleHoverEnd = () => {42 stop();43 };4445 return (46 <motion.div47 ref={scope}48 onHoverStart={handleHoverStart}49 onHoverEnd={handleHoverEnd}50 className={`inline-flex cursor-pointer items-center justify-center ${className}`}51 >52 <svg53 xmlns="http://www.w3.org/2000/svg"54 width={size}55 height={size}56 viewBox="0 0 24 24"57 fill="none"58 stroke={color}59 strokeWidth={strokeWidth}60 strokeLinecap="round"61 strokeLinejoin="round"62 >63 <path stroke="none" d="M0 0h24v24H0z" fill="none" />64 <motion.path65 className="sun-center"66 d="M12 12m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0"67 style={{ transformOrigin: "center" }}68 />69 <motion.g className="sun-rays">70 <path d="M12 5l0 .01" />71 <path d="M17 7l0 .01" />72 <path d="M19 12l0 .01" />73 <path d="M17 17l0 .01" />74 <path d="M12 19l0 .01" />75 <path d="M7 17l0 .01" />76 <path d="M5 12l0 .01" />77 <path d="M7 7l0 .01" />78 </motion.g>79 </svg>80 </motion.div>81 );82 },83);8485BrightnessDownIcon.displayName = "BrightnessDownIcon";8687export default BrightnessDownIcon;
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 |
