Reset
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 reset --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 ResetIcon({ disableHover, className }: Props) {
const classes = [
"ai-reset-icon",
disableHover ? "no-hover" : "",
className ?? "",
]
.filter(Boolean)
.join(" ");
return (
<>
<style>{`
.ai-reset-icon {
width: 1em;
height: 1em;
display: inline-block;
cursor: pointer;
overflow: visible;
}
.ai-reset-icon * {
transform-box: fill-box;
}
.ai-reset-icon.no-hover * {
transform: none;
opacity: 1;
animation: none;
}
.ai-reset-icon .arrow {
transform-box: view-box;
transform-origin: 7.5px 7.5px;
}
.ai-reset-icon:not(.no-hover):hover .arrow {
animation: ai-reset-spin 700ms linear;
}
@keyframes ai-reset-spin {
from { transform: rotate(0); }
to { transform: rotate(-360deg); }
}
`}</style>
<svg
xmlns="http://www.w3.org/2000/svg"
className={classes}
viewBox="0 0 15 15"
fill="none"
>
<path className="arrow" d="M4.22457 2.08224C4.41865 1.95407 4.68261 1.97583 4.85348 2.14669C5.02434 2.31756 5.0461 2.58152 4.91793 2.7756L4.85348 2.85372L3.70699 4.00021H8.99996C11.4852 4.00021 13.5 6.01493 13.5 8.50021C13.5 10.9855 11.4852 13.0002 8.99996 13.0002H4.99996C4.72382 13.0002 4.49996 12.7764 4.49996 12.5002C4.49996 12.2241 4.72382 12.0002 4.99996 12.0002H8.99996C10.933 12.0002 12.5 10.4332 12.5 8.50021C12.5 6.56721 10.933 5.00021 8.99996 5.00021H3.70699L4.85348 6.14669L4.91793 6.22482C5.0461 6.4189 5.02434 6.68286 4.85348 6.85372C4.68261 7.02459 4.41865 7.04634 4.22457 6.91818L4.14645 6.85372L2.14645 4.85372C1.95118 4.65846 1.95118 4.34195 2.14645 4.14669L4.14645 2.14669L4.22457 2.08224Z" fill="currentColor"/>
</svg>
</>
);
}