Border Width
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-width --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 BorderWidthIcon({ disableHover, className }: Props) {
const classes = [
"ai-border-width-icon",
disableHover ? "no-hover" : "",
className ?? "",
]
.filter(Boolean)
.join(" ");
return (
<>
<style>{`
.ai-border-width-icon {
width: 1em;
height: 1em;
display: inline-block;
cursor: pointer;
overflow: visible;
}
.ai-border-width-icon * {
transform-box: fill-box;
}
.ai-border-width-icon .bar {
transform-origin: center;
}
.ai-border-width-icon:not(.no-hover):hover .bar-thin {
animation: ai-border-width-thin 700ms ease-in-out;
}
.ai-border-width-icon:not(.no-hover):hover .bar-mid {
animation: ai-border-width-mid 700ms ease-in-out;
}
.ai-border-width-icon.no-hover * {
transform: none;
opacity: 1;
animation: none;
}
@keyframes ai-border-width-thin {
0%,
100% {
transform: translateY(0);
}
50% {
transform: translateY(6.25px);
}
}
@keyframes ai-border-width-mid {
0%,
100% {
transform: translateY(0);
}
50% {
transform: translateY(2.25px);
}
}
`}</style>
<svg
xmlns="http://www.w3.org/2000/svg"
className={classes}
viewBox="0 0 15 15"
fill="none"
>
<rect className="bar bar-thin" x="1" y="3" width="13" height="1" rx="0.5" fill="currentColor"/>
<rect className="bar bar-mid" x="1" y="6" width="13" height="2" rx="0.5" fill="currentColor"/>
<rect className="bar bar-thick" x="1" y="10.25" width="13" height="2.5" rx="0.5" fill="currentColor"/>
</svg>
</>
);
}