Pin Right
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 pin-right --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 PinRightIcon({ disableHover, className }: Props) {
const classes = [
"ai-pin-right-icon",
disableHover ? "no-hover" : "",
className ?? "",
]
.filter(Boolean)
.join(" ");
return (
<>
<style>{`
.ai-pin-right-icon {
width: 1em;
height: 1em;
display: inline-block;
cursor: pointer;
overflow: visible;
}
.ai-pin-right-icon * {
transform-box: fill-box;
}
.ai-pin-right-icon.no-hover * {
transform: none;
opacity: 1;
animation: none;
}
.ai-pin-right-icon .arrow {
transform-origin: center;
}
.ai-pin-right-icon:not(.no-hover):hover .arrow {
animation: ai-pin-right-push 700ms ease-in-out;
}
@keyframes ai-pin-right-push {
0%, 50%, 100% { transform: translateX(0); }
25%, 75% { transform: translateX(1px); }
}
`}</style>
<svg
xmlns="http://www.w3.org/2000/svg"
className={classes}
viewBox="0 0 15 15"
fill="none"
>
<path className="arrow" d="M9.87573 7.2522C9.97485 7.40205 9.97485 7.59844 9.87573 7.74829L9.81811 7.8186L6.56811 11.0686C6.39236 11.2441 6.10705 11.2443 5.9314 11.0686C5.75584 10.8929 5.75595 10.6076 5.9314 10.4319L8.41284 7.95044L0.499756 7.95044C0.251389 7.95031 0.0496518 7.74862 0.0495603 7.50024C0.0495603 7.25179 0.251333 7.05017 0.499756 7.05005L8.41284 7.05005L5.9314 4.5686L5.87378 4.49829C5.75837 4.3237 5.77781 4.08572 5.9314 3.93188C6.08519 3.77809 6.32313 3.75888 6.4978 3.87427L6.56812 3.93188L9.81811 7.18188L9.87573 7.2522Z" fill="currentColor"/>
<path className="bar" d="M12.95 13.5002C12.9498 13.7487 12.7482 13.9504 12.4998 13.9504C12.2514 13.9503 12.0497 13.7486 12.0496 13.5002L12.0496 1.50024C12.0496 1.25178 12.2513 1.05015 12.4998 1.05005C12.7483 1.05005 12.95 1.25172 12.95 1.50024L12.95 13.5002Z" fill="currentColor"/>
</svg>
</>
);
}