Cross Circled
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 cross-circled --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 CrossCircledIcon({ disableHover, className }: Props) {
const classes = [
"ai-cross-circled-icon",
disableHover ? "no-hover" : "",
className ?? "",
]
.filter(Boolean)
.join(" ");
return (
<>
<style>{`
.ai-cross-circled-icon {
width: 1em;
height: 1em;
display: inline-block;
cursor: pointer;
overflow: visible;
}
.ai-cross-circled-icon * {
transform-box: fill-box;
}
.ai-cross-circled-icon.no-hover * {
transform: none;
opacity: 1;
animation: none;
}
.ai-cross-circled-icon .cross {
transform-box: view-box;
transform-origin: 7.5px 7.5px;
}
.ai-cross-circled-icon:not(.no-hover):hover .cross {
animation: ai-cross-circled-spin 700ms ease-in-out;
}
@keyframes ai-cross-circled-spin {
0%, 100% { transform: rotate(0); }
50% { transform: rotate(90deg); }
}
`}</style>
<svg
xmlns="http://www.w3.org/2000/svg"
className={classes}
viewBox="0 0 15 15"
fill="none"
>
<circle className="ring" cx="7.5" cy="7.5" r="6.25" stroke="currentColor" strokeWidth="1"/>
<path className="cross" d="M5 5L10 10M10 5L5 10" stroke="currentColor" strokeWidth="1.25" strokeLinecap="round"/>
</svg>
</>
);
}