Tokens
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 tokens --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 TokensIcon({ disableHover, className }: Props) {
const classes = [
"ai-tokens-icon",
disableHover ? "no-hover" : "",
className ?? "",
]
.filter(Boolean)
.join(" ");
return (
<>
<style>{`
.ai-tokens-icon {
width: 1em;
height: 1em;
display: inline-block;
cursor: pointer;
overflow: visible;
}
.ai-tokens-icon * {
transform-box: fill-box;
}
.ai-tokens-icon.no-hover * {
transform: none;
opacity: 1;
animation: none;
}
.ai-tokens-icon .tl,
.ai-tokens-icon .tr,
.ai-tokens-icon .bl,
.ai-tokens-icon .br {
transform-origin: center;
}
.ai-tokens-icon:not(.no-hover):hover .tl {
animation: ai-tokens-pulse 700ms ease-in-out;
}
.ai-tokens-icon:not(.no-hover):hover .tr {
animation: ai-tokens-pulse 700ms ease-in-out 80ms;
}
.ai-tokens-icon:not(.no-hover):hover .br {
animation: ai-tokens-pulse 700ms ease-in-out 160ms;
}
.ai-tokens-icon:not(.no-hover):hover .bl {
animation: ai-tokens-pulse 700ms ease-in-out 240ms;
}
@keyframes ai-tokens-pulse {
0%, 100% { transform: scale(1); }
50% { transform: scale(1.15); }
}
`}</style>
<svg
xmlns="http://www.w3.org/2000/svg"
className={classes}
viewBox="0 0 15 15"
fill="none"
>
<path className="bl" fillRule="evenodd" d="M4.5 8C5.88072 8 7 9.11929 7 10.5C7 11.8807 5.88072 13 4.5 13C3.11929 13 2 11.8807 2 10.5C2 9.11929 3.11929 8 4.5 8ZM4.5 9C3.67157 9 3 9.67157 3 10.5C3 11.3284 3.67157 12 4.5 12C5.32843 12 6 11.3284 6 10.5C6 9.67157 5.32843 9 4.5 9Z" fill="currentColor"/>
<path className="br" fillRule="evenodd" d="M10.5 8C11.8807 8 13 9.11929 13 10.5C13 11.8807 11.8807 13 10.5 13C9.11929 13 8 11.8807 8 10.5C8 9.11929 9.11929 8 10.5 8ZM10.5 9C9.67157 9 9 9.67157 9 10.5C9 11.3284 9.67157 12 10.5 12C11.3284 12 12 11.3284 12 10.5C12 9.67157 11.3284 9 10.5 9Z" fill="currentColor"/>
<path className="tl" fillRule="evenodd" d="M4.5 2C5.88072 2 7 3.11929 7 4.5C7 5.88072 5.88072 7 4.5 7C3.11929 7 2 5.88072 2 4.5C2 3.11929 3.11929 2 4.5 2ZM4.5 3C3.67157 3 3 3.67157 3 4.5C3 5.32843 3.67157 6 4.5 6C5.32843 6 6 5.32843 6 4.5C6 3.67157 5.32843 3 4.5 3Z" fill="currentColor"/>
<path className="tr" fillRule="evenodd" d="M10.5 2C11.8807 2 13 3.11929 13 4.5C13 5.88072 11.8807 7 10.5 7C9.11929 7 8 5.88072 8 4.5C8 3.11929 9.11929 2 10.5 2ZM10.5 3C9.67157 3 9 3.67157 9 4.5C9 5.32843 9.67157 6 10.5 6C11.3284 6 12 5.32843 12 4.5C12 3.67157 11.3284 3 10.5 3Z" fill="currentColor"/>
</svg>
</>
);
}