Stop
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 stop --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 StopIcon({ disableHover, className }: Props) {
const classes = [
"ai-stop-icon",
disableHover ? "no-hover" : "",
className ?? "",
]
.filter(Boolean)
.join(" ");
return (
<>
<style>{`
.ai-stop-icon {
width: 1em;
height: 1em;
display: inline-block;
cursor: pointer;
overflow: visible;
}
.ai-stop-icon * {
transform-box: fill-box;
}
.ai-stop-icon.no-hover * {
transform: none;
opacity: 1;
animation: none;
}
.ai-stop-icon .square {
transform-box: view-box;
transform-origin: 7.5px 7.5px;
}
.ai-stop-icon:not(.no-hover):hover .square {
animation: ai-stop-press 700ms ease-in-out;
}
@keyframes ai-stop-press {
0%, 100% { transform: scale(1); }
50% { transform: scale(0.85); }
}
`}</style>
<svg
xmlns="http://www.w3.org/2000/svg"
className={classes}
viewBox="0 0 15 15"
fill="none"
>
<path className="square" fillRule="evenodd" d="M12 2C12.5523 2 13 2.44772 13 3V12C13 12.5523 12.5523 13 12 13H3C2.44772 13 2 12.5523 2 12V3C2 2.44772 2.44772 2 3 2H12ZM3 12H12V3H3V12Z" fill="currentColor"/>
</svg>
</>
);
}