Align Horizontal Centers
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 align-horizontal-centers --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 AlignHorizontalCentersIcon({ disableHover, className }: Props) {
const classes = [
"ai-align-horizontal-centers-icon",
disableHover ? "no-hover" : "",
className ?? "",
]
.filter(Boolean)
.join(" ");
return (
<>
<style>{`
.ai-align-horizontal-centers-icon {
width: 1em;
height: 1em;
display: inline-block;
cursor: pointer;
overflow: visible;
}
.ai-align-horizontal-centers-icon * {
transform-box: fill-box;
}
.ai-align-horizontal-centers-icon:not(.no-hover):hover .left-block,
.ai-align-horizontal-centers-icon:not(.no-hover):hover .right-block {
animation: ai-align-horizontal-centers-motion 700ms ease-in-out;
}
.ai-align-horizontal-centers-icon.no-hover * {
transform: none;
opacity: 1;
animation: none;
}
@keyframes ai-align-horizontal-centers-motion {
0%,
100% {
transform: translateY(0);
}
33% {
transform: translateY(-1.25px);
}
66% {
transform: translateY(1.25px);
}
}
`}</style>
<svg
xmlns="http://www.w3.org/2000/svg"
className={classes}
viewBox="0 0 15 15"
fill="none"
>
<path className="guide" d="M7.5 1.5V13.5" stroke="currentColor" strokeWidth="1" strokeLinecap="round"/>
<rect className="left-block" x="2" y="2.25" width="4" height="10.5" rx="0.8" stroke="currentColor" strokeWidth="1"/>
<rect className="right-block" x="9" y="4.25" width="4" height="6.5" rx="0.8" fill="currentColor"/>
</svg>
</>
);
}