← Back

Rows

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

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

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

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

.ai-rows-icon .row-1,
.ai-rows-icon .row-2,
.ai-rows-icon .row-3,
.ai-rows-icon .row-4 {
  transform-origin: center;
}

.ai-rows-icon:not(.no-hover):hover .row-1 {
  animation: ai-rows-slide 700ms ease-in-out;
}

.ai-rows-icon:not(.no-hover):hover .row-2 {
  animation: ai-rows-slide 700ms ease-in-out 80ms;
}

.ai-rows-icon:not(.no-hover):hover .row-3 {
  animation: ai-rows-slide 700ms ease-in-out 160ms;
}

.ai-rows-icon:not(.no-hover):hover .row-4 {
  animation: ai-rows-slide 700ms ease-in-out 240ms;
}

@keyframes ai-rows-slide {
  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="row-1" d="M14 0.849213L14 2.14999L1 2.14999L1 0.849213L14 0.849213Z" fill="currentColor"/>
        <path className="row-2" d="M14 4.84921L14 6.14999L1 6.14999L1 4.84921L14 4.84921Z" fill="currentColor"/>
        <path className="row-3" d="M14 8.84921L14 10.15L1 10.15L1 8.84921L14 8.84921Z" fill="currentColor"/>
        <path className="row-4" d="M14 12.8492L14 14.15L1 14.15L1 12.8492L14 12.8492Z" fill="currentColor"/>
      </svg>
    </>
  );
}