Minus
Install
npm install @svg-animated-icons/reactCLI
Copy an icon component straight into your project — shadcn-style. Replace {icon} with an icon name like arrow-left.
terminal
npx @svg-animated-icons/cli add {icon} --react| Flag | Description |
|---|---|
--dest <dir> | Destination directory (default: components/animated-icons) |
Or copy the component with the CLI
CLI
npx @svg-animated-icons/cli add minus --reactCode
React
// Generated by @svg-animated-icons/cli
// You own this file — edit it freely.
import React from "react";
type Props = {
disableHover?: boolean;
className?: string;
};
export function MinusIcon({ disableHover, className }: Props) {
const classes = [
"ai-minus-icon",
disableHover ? "no-hover" : "",
className ?? "",
]
.filter(Boolean)
.join(" ");
return (
<>
<style>{`
.ai-minus-icon {
width: 1em;
height: 1em;
display: inline-block;
cursor: pointer;
overflow: visible;
}
.ai-minus-icon * {
transform-box: fill-box;
}
.ai-minus-icon.no-hover * {
transform: none;
opacity: 1;
animation: none;
}
.ai-minus-icon .dash {
transform-origin: center;
}
.ai-minus-icon:not(.no-hover):hover .dash {
animation: ai-minus-stretch 700ms ease-in-out;
}
@keyframes ai-minus-stretch {
0%, 100% { transform: scaleX(1); }
50% { transform: scaleX(1.18); }
}
`}</style>
<svg
xmlns="http://www.w3.org/2000/svg"
className={classes}
viewBox="0 0 15 15"
fill="none"
>
<path className="dash" d="M12.25 7C12.5261 7 12.75 7.22386 12.75 7.5C12.75 7.77614 12.5261 8 12.25 8H2.75C2.47386 8 2.25 7.77614 2.25 7.5C2.25 7.22386 2.47386 7 2.75 7H12.25Z" fill="currentColor"/>
</svg>
</>
);
}