← Back

Half 1

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

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

.ai-half-1-icon * {
  transform-box: fill-box;
}

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

.ai-half-1-icon .half {
  transform-box: view-box;
  transform-origin: 7.5px 7.5px;
}

.ai-half-1-icon:not(.no-hover):hover .half {
  animation: ai-half-1-spin 700ms ease-in-out;
}

@keyframes ai-half-1-spin {
  0% { transform: scaleX(1); }
  25% { transform: scaleX(0); }
  50% { transform: scaleX(-1); }
  75% { transform: scaleX(0); }
  100% { transform: scaleX(1); }
}
`}</style>
      <svg
        xmlns="http://www.w3.org/2000/svg"
        className={classes}
        viewBox="0 0 15 15"
        fill="none"
      >
        <path className="half" 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.00012 1.84857C4.10141 2.10165 1.82668 4.53471 1.82629 7.49896C1.82629 10.4635 4.10123 12.8952 7.00012 13.1484V1.84857ZM8.00012 13.1484C10.8986 12.8949 13.172 10.4632 13.172 7.49896C13.1716 4.53499 10.8984 2.10203 8.00012 1.84857V13.1484Z" fill="currentColor"/>
      </svg>
    </>
  );
}