All Sides
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 all-sides --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 AllSidesIcon({ disableHover, className }: Props) {
const classes = [
"ai-all-sides-icon",
disableHover ? "no-hover" : "",
className ?? "",
]
.filter(Boolean)
.join(" ");
return (
<>
<style>{`
.ai-all-sides-icon {
width: 1em;
height: 1em;
display: inline-block;
cursor: pointer;
overflow: visible;
}
.ai-all-sides-icon * {
transform-box: fill-box;
transition: transform 320ms cubic-bezier(0.34, 1.56, 0.64, 1), opacity 220ms ease;
}
.ai-all-sides-icon .top,
.ai-all-sides-icon .right,
.ai-all-sides-icon .bottom,
.ai-all-sides-icon .left {
transform-origin: center;
}
.ai-all-sides-icon:not(.no-hover):hover .top {
animation: ai-all-sides-motion-1 700ms cubic-bezier(0.34, 1.56, 0.64, 1);
}
.ai-all-sides-icon:not(.no-hover):hover .right {
animation: ai-all-sides-motion-2 700ms cubic-bezier(0.34, 1.56, 0.64, 1);
animation-delay: 35ms;
}
.ai-all-sides-icon:not(.no-hover):hover .bottom {
animation: ai-all-sides-motion-3 700ms cubic-bezier(0.34, 1.56, 0.64, 1);
animation-delay: 70ms;
}
.ai-all-sides-icon:not(.no-hover):hover .left {
animation: ai-all-sides-motion-4 700ms cubic-bezier(0.34, 1.56, 0.64, 1);
animation-delay: 105ms;
}
.ai-all-sides-icon.no-hover * {
transform: none;
opacity: 1;
animation: none;
}
@keyframes ai-all-sides-motion-1 {
0%,
100% {
transform: none;
}
52% {
transform: translateY(-0.8px);
}
}
@keyframes ai-all-sides-motion-2 {
0%,
100% {
transform: none;
}
52% {
transform: translateX(0.8px);
}
}
@keyframes ai-all-sides-motion-3 {
0%,
100% {
transform: none;
}
52% {
transform: translateY(0.8px);
}
}
@keyframes ai-all-sides-motion-4 {
0%,
100% {
transform: none;
}
52% {
transform: translateX(-0.8px);
}
}
`}</style>
<svg
xmlns="http://www.w3.org/2000/svg"
className={classes}
viewBox="0 0 15 15"
fill="none"
>
<path className="top" d="M7.5 0.9L9.75 3.15H5.25L7.5 0.9Z" fill="currentColor"/>
<path className="right" d="M14.1 7.5L11.85 9.75V5.25L14.1 7.5Z" fill="currentColor"/>
<path className="bottom" d="M7.5 14.1L5.25 11.85H9.75L7.5 14.1Z" fill="currentColor"/>
<path className="left" d="M0.9 7.5L3.15 5.25V9.75L0.9 7.5Z" fill="currentColor"/>
</svg>
</>
);
}