Justify Center
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 justify-center --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 JustifyCenterIcon({ disableHover, className }: Props) {
const classes = [
"ai-justify-center-icon",
disableHover ? "no-hover" : "",
className ?? "",
]
.filter(Boolean)
.join(" ");
return (
<>
<style>{`
.ai-justify-center-icon {
width: 1em;
height: 1em;
display: inline-block;
cursor: pointer;
overflow: visible;
}
.ai-justify-center-icon * {
transform-box: fill-box;
}
.ai-justify-center-icon.no-hover * {
transform: none;
opacity: 1;
animation: none;
}
.ai-justify-center-icon .pill {
transform-origin: center;
}
.ai-justify-center-icon:not(.no-hover):hover .pill {
animation: ai-justify-center-rock 700ms ease-in-out;
}
@keyframes ai-justify-center-rock {
0%, 100% { transform: translateX(0); }
30% { transform: translateX(-1px); }
70% { transform: translateX(1px); }
}
`}</style>
<svg
xmlns="http://www.w3.org/2000/svg"
className={classes}
viewBox="0 0 15 15"
fill="none"
>
<path className="axis" d="M7.04998 1.49913C7.04998 1.2506 7.25145 1.04913 7.49998 1.04913C7.74851 1.04913 7.94998 1.25061 7.94998 1.49913V13.4991C7.94998 13.7477 7.7485 13.9491 7.49998 13.9491C7.25145 13.9491 7.04998 13.7477 7.04998 13.4991V1.49913Z" fill="currentColor"/>
<path className="pill" fillRule="evenodd" clipRule="evenodd" d="M3.75 4.99994H11.25C11.6642 4.99994 12 5.33573 12 5.74994V9.24994C12 9.66415 11.6642 9.99994 11.25 9.99994H3.75C3.33579 9.99994 3 9.66415 3 9.24994V5.74994C3 5.33572 3.33579 4.99994 3.75 4.99994ZM7.94998 5.99994L11 5.99994L11 8.99994L7.94998 8.99994L7.94998 5.99994ZM7.04998 8.99994L4 8.99994L4 5.99994L7.04998 5.99994L7.04998 8.99994Z" fill="currentColor"/>
</svg>
</>
);
}