Color Wheel
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 color-wheel --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 ColorWheelIcon({ disableHover, className }: Props) {
const classes = [
"ai-color-wheel-icon",
disableHover ? "no-hover" : "",
className ?? "",
]
.filter(Boolean)
.join(" ");
return (
<>
<style>{`
.ai-color-wheel-icon {
width: 1em;
height: 1em;
display: inline-block;
cursor: pointer;
overflow: visible;
}
.ai-color-wheel-icon * {
transform-box: fill-box;
}
.ai-color-wheel-icon.no-hover * {
transform: none;
opacity: 1;
animation: none;
}
.ai-color-wheel-icon .spokes,
.ai-color-wheel-icon .wheel {
transform-box: view-box;
transform-origin: 7.5px 7.5px;
}
.ai-color-wheel-icon:not(.no-hover):hover .spokes {
animation: ai-color-wheel-spin 700ms ease-in-out;
}
@keyframes ai-color-wheel-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="wheel" cx="7.5" cy="7.5" r="6.25" stroke="currentColor" strokeWidth="1"/>
<path className="spokes" d="M1.25 7.5H13.75M7.5 1.25V13.75M3.1 3.1L11.9 11.9M11.9 3.1L3.1 11.9" stroke="currentColor" strokeWidth="1"/>
</svg>
</>
);
}