Codesandbox Logo
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 codesandbox-logo --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 CodesandboxLogoIcon({ disableHover, className }: Props) {
const classes = [
"ai-codesandbox-logo-icon",
disableHover ? "no-hover" : "",
className ?? "",
]
.filter(Boolean)
.join(" ");
return (
<>
<style>{`
.ai-codesandbox-logo-icon {
width: 1em;
height: 1em;
display: inline-block;
cursor: pointer;
overflow: visible;
}
.ai-codesandbox-logo-icon * {
transform-box: fill-box;
}
.ai-codesandbox-logo-icon.no-hover * {
transform: none;
opacity: 1;
animation: none;
}
.ai-codesandbox-logo-icon .outline,
.ai-codesandbox-logo-icon .seam {
transform-box: view-box;
transform-origin: 7.5px 7.5px;
}
.ai-codesandbox-logo-icon:not(.no-hover):hover .outline,
.ai-codesandbox-logo-icon:not(.no-hover):hover .seam {
animation: ai-codesandbox-logo-spin 700ms ease-in-out;
}
@keyframes ai-codesandbox-logo-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="outline" d="M7.5 1L13.25 4.25V10.75L7.5 14L1.75 10.75V4.25Z" stroke="currentColor" strokeWidth="1" strokeLinejoin="round"/>
<path className="seam" d="M7.5 7.5V14M7.5 7.5L1.75 4.25M7.5 7.5L13.25 4.25" stroke="currentColor" strokeWidth="1" strokeLinejoin="round"/>
</svg>
</>
);
}