Transparency Grid
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 transparency-grid --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 TransparencyGridIcon({ disableHover, className }: Props) {
const classes = [
"ai-transparency-grid-icon",
disableHover ? "no-hover" : "",
className ?? "",
]
.filter(Boolean)
.join(" ");
return (
<>
<style>{`
.ai-transparency-grid-icon {
width: 1em;
height: 1em;
display: inline-block;
cursor: pointer;
overflow: visible;
}
.ai-transparency-grid-icon * {
transform-box: fill-box;
}
.ai-transparency-grid-icon.no-hover * {
transform: none;
opacity: 1;
animation: none;
}
.ai-transparency-grid-icon .grid {
transform-box: view-box;
transform-origin: 7.5px 7.5px;
}
.ai-transparency-grid-icon:not(.no-hover):hover .grid {
animation: ai-transparency-grid-fade 700ms ease-in-out;
}
@keyframes ai-transparency-grid-fade {
0%, 100% { opacity: 0.25; transform: scale(1); }
50% { opacity: 0.55; transform: scale(0.95); }
}
`}</style>
<svg
xmlns="http://www.w3.org/2000/svg"
className={classes}
viewBox="0 0 15 15"
fill="none"
>
<path className="grid" opacity=".25" d="M3 15H0V12H3V15ZM9 15H6V12H9V15ZM15 15H12V12H15V15ZM6 12H3V9H6V12ZM12 12H9V9H12V12ZM3 9H0V6H3V9ZM9 9H6V6H9V9ZM15 9H12V6H15V9ZM6 6H3V3H6V6ZM12 6H9V3H12V6ZM3 3H0V0H3V3ZM9 3H6V0H9V3ZM15 3H12V0H15V3Z" fill="currentColor"/>
</svg>
</>
);
}