← Back

Pause

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

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

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

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

.ai-pause-icon .bar-left,
.ai-pause-icon .bar-right {
  transform-origin: center;
}

.ai-pause-icon:not(.no-hover):hover .bar-left {
  animation: ai-pause-tap-left 700ms ease-in-out;
}

.ai-pause-icon:not(.no-hover):hover .bar-right {
  animation: ai-pause-tap-right 700ms ease-in-out;
}

@keyframes ai-pause-tap-left {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(-0.6px); }
}

@keyframes ai-pause-tap-right {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(0.6px); }
}
`}</style>
      <svg
        xmlns="http://www.w3.org/2000/svg"
        className={classes}
        viewBox="0 0 15 15"
        fill="none"
      >
        <path className="bar-left" d="M5.49982 2.19999C5.80351 2.19999 6.04952 2.44613 6.04962 2.74979V12.2498C6.04962 12.5536 5.80357 12.7996 5.49982 12.7996C5.19615 12.7995 4.95001 12.5535 4.95001 12.2498V2.74979C4.95012 2.44619 5.19622 2.20009 5.49982 2.19999Z" fill="currentColor"/>
        <path className="bar-right" d="M9.49982 2.19999C9.80351 2.19999 10.0495 2.44613 10.0496 2.74979V12.2498C10.0496 12.5536 9.80357 12.7996 9.49982 12.7996C9.19615 12.7995 8.95001 12.5535 8.95001 12.2498V2.74979C8.95012 2.44619 9.19622 2.20009 9.49982 2.19999Z" fill="currentColor"/>
      </svg>
    </>
  );
}