← Back

Dot

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

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

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

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

.ai-dot-icon .ring {
  stroke-dasharray: 17;
}

.ai-dot-icon:not(.no-hover):hover .ring {
  animation: ai-dot-redraw 700ms ease-in-out;
}

@keyframes ai-dot-redraw {
  0% { stroke-dashoffset: 0; }
  50% { stroke-dashoffset: -17; }
  100% { stroke-dashoffset: -34; }
}
`}</style>
      <svg
        xmlns="http://www.w3.org/2000/svg"
        className={classes}
        viewBox="0 0 15 15"
        fill="none"
      >
        <circle className="ring" cx="7.5" cy="7.5" r="2.625" stroke="currentColor" strokeWidth="1"/>
      </svg>
    </>
  );
}