← Back

Track Previous

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

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

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

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

.ai-track-previous-icon .triangle {
  transform-origin: center;
}

.ai-track-previous-icon:not(.no-hover):hover .triangle {
  animation: ai-track-previous-push 700ms ease-in-out;
}

@keyframes ai-track-previous-push {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(-1px); }
}
`}</style>
      <svg
        xmlns="http://www.w3.org/2000/svg"
        className={classes}
        viewBox="0 0 15 15"
        fill="none"
      >
        <path className="bar" d="M2.50006 2.19987C2.19637 2.19987 1.95036 2.44601 1.95026 2.74968V12.2497C1.95026 12.5534 2.1963 12.7995 2.50006 12.7995C2.80371 12.7994 3.04987 12.5534 3.04987 12.2497V2.74968C3.04976 2.44609 2.80364 2.20001 2.50006 2.19987Z" fill="currentColor"/>
        <path className="triangle" fillRule="evenodd" d="M12.2667 2.3073C12.4216 2.22563 12.6078 2.23159 12.7579 2.32195C12.9079 2.41239 13 2.57453 13.0001 2.74968V12.2497C13.0001 12.4249 12.9079 12.5869 12.7579 12.6774C12.6079 12.7679 12.4216 12.7738 12.2667 12.6921L3.26666 7.94206C3.17011 7.89103 3.09545 7.81069 3.04987 7.7155V7.28386C3.09545 7.18882 3.17011 7.10825 3.26666 7.0573L12.2667 2.3073ZM12.0001 11.4196L4.57233 7.49968L12.0001 3.57878V11.4196Z" fill="currentColor"/>
      </svg>
    </>
  );
}