← Back

Eye Open

Install

npm install @svg-animated-icons/react

CLI

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
FlagDescription
--dest <dir>Destination directory (default: components/animated-icons)

Or copy the component with the CLI

CLI
npx @svg-animated-icons/cli add eye-open --react

Code

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 EyeOpenIcon({ disableHover, className }: Props) {
  const classes = [
    "ai-eye-open-icon",
    disableHover ? "no-hover" : "",
    className ?? "",
  ]
    .filter(Boolean)
    .join(" ");

  return (
    <>
      <style>{`
.ai-eye-open-icon {
  width: 1em;
  height: 1em;
  display: inline-block;
  cursor: pointer;
  overflow: visible;
}

.ai-eye-open-icon * {
  transform-box: fill-box;
}

.ai-eye-open-icon.no-hover * {
  transform: none;
  opacity: 1;
  animation: none;
}

.ai-eye-open-icon .pupil { transform-origin: center; }

.ai-eye-open-icon:not(.no-hover):hover .pupil {
  animation: ai-eye-open-look 700ms ease-in-out;
}

@keyframes ai-eye-open-look {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-1.25px); }
  75% { transform: translateX(1.25px); }
}
`}</style>
      <svg
        xmlns="http://www.w3.org/2000/svg"
        className={classes}
        viewBox="0 0 15 15"
        fill="none"
      >
        <path className="eye" d="M7.50002 3C10.6922 3 13.3435 4.70671 14.9239 7.23535C15.0124 7.37717 15.0235 7.55201 14.9571 7.70215L14.9239 7.76465C13.3435 10.2933 10.6922 12 7.50002 12C4.30788 12 1.65659 10.2933 0.0761963 7.76465C-0.0249881 7.6026 -0.0249956 7.3974 0.0761963 7.23535L0.227563 7C1.82294 4.60122 4.4078 3 7.50002 3ZM7.50002 4C4.80354 4 2.53299 5.37905 1.09963 7.5C2.53299 9.62094 4.80354 11 7.50002 11C10.1963 11 12.4661 9.62068 13.8994 7.5C12.4661 5.3793 10.1963 4 7.50002 4Z" fill="currentColor"/>
        <path className="pupil" d="M7.50002 5.5C8.60459 5.5 9.50002 6.39543 9.50002 7.5C9.50002 8.60457 8.60459 9.5 7.50002 9.5C6.39545 9.5 5.50002 8.60457 5.50002 7.5C5.50002 6.39543 6.39545 5.5 7.50002 5.5Z" fill="currentColor"/>
      </svg>
    </>
  );
}