Bookmark
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 bookmark --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 BookmarkIcon({ disableHover, className }: Props) {
const classes = [
"ai-bookmark-icon",
disableHover ? "no-hover" : "",
className ?? "",
]
.filter(Boolean)
.join(" ");
return (
<>
<style>{`
.ai-bookmark-icon {
width: 1em;
height: 1em;
display: inline-block;
cursor: pointer;
overflow: visible;
}
.ai-bookmark-icon * {
transform-box: fill-box;
}
.ai-bookmark-icon .ribbon {
transform-origin: center top;
}
.ai-bookmark-icon:not(.no-hover):hover .ribbon {
animation: ai-bookmark-motion-1 700ms ease-in-out;
}
.ai-bookmark-icon.no-hover * {
transform: none;
opacity: 1;
animation: none;
}
@keyframes ai-bookmark-motion-1 {
0%,
100% {
transform: translateY(0);
}
50% {
transform: translateY(1px);
}
}
`}</style>
<svg
xmlns="http://www.w3.org/2000/svg"
className={classes}
viewBox="0 0 15 15"
fill="none"
>
<path className="ribbon" d="M3.5 2.5C3.5 2.22 3.72 2 4 2H11C11.28 2 11.5 2.22 11.5 2.5V13L7.5 11L3.5 13V2.5Z" stroke="currentColor" strokeWidth="1" strokeLinejoin="round"/>
</svg>
</>
);
}