Face
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 face --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 FaceIcon({ disableHover, className }: Props) {
const classes = [
"ai-face-icon",
disableHover ? "no-hover" : "",
className ?? "",
]
.filter(Boolean)
.join(" ");
return (
<>
<style>{`
.ai-face-icon {
width: 1em;
height: 1em;
display: inline-block;
cursor: pointer;
overflow: visible;
}
.ai-face-icon * {
transform-box: fill-box;
}
.ai-face-icon.no-hover * {
transform: none;
opacity: 1;
animation: none;
}
.ai-face-icon .eye-right {
transform-origin: center;
}
.ai-face-icon:not(.no-hover):hover .eye-right {
animation: ai-face-blink 700ms ease-in-out;
}
@keyframes ai-face-blink {
0%, 30%, 70%, 100% { transform: scaleY(1); }
40%, 60% { transform: scaleY(0.1); }
}
`}</style>
<svg
xmlns="http://www.w3.org/2000/svg"
className={classes}
viewBox="0 0 15 15"
fill="none"
>
<path className="face" d="M7.49915 0.876892C11.1566 0.876892 14.1218 3.84163 14.1222 7.49896C14.1222 11.1566 11.1568 14.122 7.49915 14.122C3.84181 14.1216 0.877075 11.1564 0.877075 7.49896C0.877487 3.84188 3.84206 0.877303 7.49915 0.876892ZM7.49915 1.82611C4.36674 1.82652 1.82671 4.36655 1.82629 7.49896C1.82629 10.6317 4.36648 13.1714 7.49915 13.1718C10.6321 13.1718 13.172 10.632 13.172 7.49896C13.172 4.36645 10.6319 1.82626 7.49915 1.82611ZM5.37512 5.09955C5.85818 5.0996 6.24989 5.4916 6.25012 5.97455C6.25012 6.45769 5.85833 6.8495 5.37512 6.84955C4.89188 6.84955 4.50012 6.45772 4.50012 5.97455C4.50035 5.49157 4.89202 5.09955 5.37512 5.09955Z" fill="currentColor"/>
<path className="smile" d="M9.96204 9.21381C10.1199 8.98743 10.4319 8.93209 10.6583 9.08978C10.8848 9.24776 10.9403 9.55958 10.7823 9.78607C10.0604 10.8209 8.85957 11.4998 7.50012 11.4999C6.22536 11.4998 5.0893 10.9031 4.35754 9.97552L4.21692 9.78607L4.16809 9.6972C4.07619 9.48379 4.14301 9.22799 4.34094 9.08978C4.53889 8.95171 4.80221 8.97695 4.97083 9.13666L5.03723 9.21381L5.1427 9.35638C5.6927 10.0537 6.54474 10.4998 7.50012 10.4999C8.51893 10.4998 9.41912 9.99204 9.96204 9.21381Z" fill="currentColor"/>
<path className="eye-right" d="M9.62512 5.09955C10.1082 5.0996 10.4999 5.4916 10.5001 5.97455C10.5001 6.45769 10.1083 6.8495 9.62512 6.84955C9.14188 6.84955 8.75012 6.45772 8.75012 5.97455C8.75035 5.49157 9.14202 5.09955 9.62512 5.09955Z" fill="currentColor"/>
</svg>
</>
);
}