← Back

Border Dotted

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

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

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

.ai-border-dotted-icon:not(.no-hover):hover .dot {
  animation: ai-border-dotted-motion-1 700ms ease-in-out;
}

.ai-border-dotted-icon:not(.no-hover):hover .dot-1 { animation-delay: 0ms; }
.ai-border-dotted-icon:not(.no-hover):hover .dot-2 { animation-delay: 90ms; }
.ai-border-dotted-icon:not(.no-hover):hover .dot-3 { animation-delay: 180ms; }
.ai-border-dotted-icon:not(.no-hover):hover .dot-4 { animation-delay: 270ms; }

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

@keyframes ai-border-dotted-motion-1 {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.3;
  }
}
`}</style>
      <svg
        xmlns="http://www.w3.org/2000/svg"
        className={classes}
        viewBox="0 0 15 15"
        fill="none"
      >
        <circle className="dot dot-1" cx="1.5" cy="7.5" r="0.875" fill="currentColor"/>
        <circle className="dot dot-2" cx="5.5" cy="7.5" r="0.875" fill="currentColor"/>
        <circle className="dot dot-3" cx="9.5" cy="7.5" r="0.875" fill="currentColor"/>
        <circle className="dot dot-4" cx="13.5" cy="7.5" r="0.875" fill="currentColor"/>
      </svg>
    </>
  );
}