View 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 view-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 ViewGridIcon({ disableHover, className }: Props) {
const classes = [
"ai-view-grid-icon",
disableHover ? "no-hover" : "",
className ?? "",
]
.filter(Boolean)
.join(" ");
return (
<>
<style>{`
.ai-view-grid-icon {
width: 1em;
height: 1em;
display: inline-block;
cursor: pointer;
overflow: visible;
}
.ai-view-grid-icon * {
transform-box: fill-box;
}
.ai-view-grid-icon.no-hover * {
transform: none;
opacity: 1;
animation: none;
}
.ai-view-grid-icon .q {
transform-origin: center;
}
.ai-view-grid-icon:not(.no-hover):hover .tl {
animation: ai-view-grid-pulse 700ms ease-in-out 0ms;
}
.ai-view-grid-icon:not(.no-hover):hover .tr {
animation: ai-view-grid-pulse 700ms ease-in-out 80ms;
}
.ai-view-grid-icon:not(.no-hover):hover .br {
animation: ai-view-grid-pulse 700ms ease-in-out 160ms;
}
.ai-view-grid-icon:not(.no-hover):hover .bl {
animation: ai-view-grid-pulse 700ms ease-in-out 240ms;
}
@keyframes ai-view-grid-pulse {
0%, 100% { fill: black; }
50% { fill: #888; }
}
`}</style>
<svg
xmlns="http://www.w3.org/2000/svg"
className={classes}
viewBox="0 0 15 15"
fill="none"
>
<defs>
<mask id="ai-view-grid-mask">
<rect width="15" height="15" fill="white"/>
<path className="q tl" d="M1.5 2C1.22386 2 1 2.22386 1 2.5V7H7V2H1.5Z" fill="black"/>
<path className="q tr" d="M8 7H14V2.5C14 2.22386 13.7761 2 13.5 2H8V7Z" fill="black"/>
<path className="q bl" d="M1 12.5C1 12.7761 1.22386 13 1.5 13H7V8H1V12.5Z" fill="black"/>
<path className="q br" d="M8 13H13.5C13.7761 13 14 12.7761 14 12.5V8H8V13Z" fill="black"/>
</mask>
</defs>
<path className="frame" d="M13.6533 1.00781C14.4097 1.08461 15 1.72334 15 2.5V12.5L14.9922 12.6533C14.9205 13.3593 14.3593 13.9205 13.6533 13.9922L13.5 14H1.5L1.34668 13.9922C0.64069 13.9205 0.0794913 13.3593 0.0078125 12.6533L0 12.5V2.5C1.51001e-07 1.72334 0.590277 1.08461 1.34668 1.00781L1.5 1H13.5L13.6533 1.00781Z" fill="currentColor" mask="url(#ai-view-grid-mask)"/>
</svg>
</>
);
}