Component None
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 component-none --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 ComponentNoneIcon({ disableHover, className }: Props) {
const classes = [
"ai-component-none-icon",
disableHover ? "no-hover" : "",
className ?? "",
]
.filter(Boolean)
.join(" ");
return (
<>
<style>{`
.ai-component-none-icon {
width: 1em;
height: 1em;
display: inline-block;
cursor: pointer;
overflow: visible;
}
.ai-component-none-icon * {
transform-box: fill-box;
}
.ai-component-none-icon.no-hover * {
transform: none;
opacity: 1;
animation: none;
}
.ai-component-none-icon .slash {
stroke-dasharray: 16;
stroke-dashoffset: 0;
}
.ai-component-none-icon:not(.no-hover):hover .slash {
animation: ai-component-none-draw 700ms ease-in-out;
}
@keyframes ai-component-none-draw {
0% { stroke-dashoffset: 0; }
50% { stroke-dashoffset: -16; }
100% { stroke-dashoffset: -32; }
}
`}</style>
<svg
xmlns="http://www.w3.org/2000/svg"
className={classes}
viewBox="0 0 15 15"
fill="none"
>
<path className="diamond" d="M7.5 1.5L12.5 7.5L7.5 13.5L2.5 7.5Z" stroke="currentColor" strokeWidth="1" strokeLinejoin="round"/>
<path className="slash" d="M2 13L13 2" stroke="currentColor" strokeWidth="1" strokeLinecap="round"/>
</svg>
</>
);
}