Border Split
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 border-split --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 BorderSplitIcon({ disableHover, className }: Props) {
const classes = [
"ai-border-split-icon",
disableHover ? "no-hover" : "",
className ?? "",
]
.filter(Boolean)
.join(" ");
return (
<>
<style>{`
.ai-border-split-icon {
width: 1em;
height: 1em;
display: inline-block;
cursor: pointer;
overflow: visible;
}
.ai-border-split-icon * {
transform-box: fill-box;
}
.ai-border-split-icon .bracket {
transform-origin: center;
}
.ai-border-split-icon:not(.no-hover):hover .bracket-tl {
animation: ai-border-split-motion-1 700ms ease-in-out;
}
.ai-border-split-icon:not(.no-hover):hover .bracket-br {
animation: ai-border-split-motion-2 700ms ease-in-out;
}
.ai-border-split-icon.no-hover * {
transform: none;
opacity: 1;
animation: none;
}
@keyframes ai-border-split-motion-1 {
0%,
100% {
transform: translate(0, 0);
}
50% {
transform: translate(-1px, -1px);
}
}
@keyframes ai-border-split-motion-2 {
0%,
100% {
transform: translate(0, 0);
}
50% {
transform: translate(1px, 1px);
}
}
`}</style>
<svg
xmlns="http://www.w3.org/2000/svg"
className={classes}
viewBox="0 0 15 15"
fill="none"
>
<path className="bracket bracket-tl" d="M2 6V2H6" stroke="currentColor" strokeWidth="1.25" strokeLinecap="round" strokeLinejoin="round"/>
<path className="bracket bracket-br" d="M9 13H13V9" stroke="currentColor" strokeWidth="1.25" strokeLinecap="round" strokeLinejoin="round"/>
</svg>
</>
);
}