← Back

Dots Horizontal

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

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

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

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

.ai-dots-horizontal-icon .dot { transform-origin: center; }

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

.ai-dots-horizontal-icon:not(.no-hover):hover .dot-1 { animation-delay: 0ms; }
.ai-dots-horizontal-icon:not(.no-hover):hover .dot-2 { animation-delay: 120ms; }
.ai-dots-horizontal-icon:not(.no-hover):hover .dot-3 { animation-delay: 240ms; }

@keyframes ai-dots-horizontal-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-1.5px); }
}
`}</style>
      <svg
        xmlns="http://www.w3.org/2000/svg"
        className={classes}
        viewBox="0 0 15 15"
        fill="none"
      >
        <circle className="dot dot-1" cx="2.5" cy="7.5" r="1.125" fill="currentColor"/>
        <circle className="dot dot-2" cx="7.5" cy="7.5" r="1.125" fill="currentColor"/>
        <circle className="dot dot-3" cx="12.5" cy="7.5" r="1.125" fill="currentColor"/>
      </svg>
    </>
  );
}