Disc
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 disc --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 DiscIcon({ disableHover, className }: Props) {
const classes = [
"ai-disc-icon",
disableHover ? "no-hover" : "",
className ?? "",
]
.filter(Boolean)
.join(" ");
return (
<>
<style>{`
.ai-disc-icon {
width: 1em;
height: 1em;
display: inline-block;
cursor: pointer;
overflow: visible;
}
.ai-disc-icon * {
transform-box: fill-box;
}
.ai-disc-icon.no-hover * {
transform: none;
opacity: 1;
animation: none;
}
.ai-disc-icon .reflection {
transform-box: view-box;
transform-origin: 7.5px 7.5px;
}
.ai-disc-icon:not(.no-hover):hover .reflection {
animation: ai-disc-spin 700ms linear;
}
@keyframes ai-disc-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"
>
<circle className="outer" cx="7.5" cy="7.5" r="6.25" stroke="currentColor" strokeWidth="1"/>
<circle className="inner" cx="7.5" cy="7.5" r="1.75" stroke="currentColor" strokeWidth="1"/>
<circle className="dot" cx="7.5" cy="7.5" r="0.5" fill="currentColor"/>
<path className="reflection" d="M9 4.5C10.5 5 11.5 6 12 7.5" stroke="currentColor" strokeWidth="0.75" strokeLinecap="round" opacity="0.6"/>
</svg>
</>
);
}