← Back

Align Stretch

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

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

.ai-align-stretch-icon * {
  transform-box: fill-box;
  transition: transform 320ms cubic-bezier(0.34, 1.56, 0.64, 1), opacity 220ms ease;
}

.ai-align-stretch-icon .block {
  transform-origin: center;
}
.ai-align-stretch-icon .top-rail,
.ai-align-stretch-icon .bottom-rail {
  transform-origin: center;
}

.ai-align-stretch-icon:not(.no-hover):hover .block {
  animation: ai-align-stretch-motion-1 700ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.ai-align-stretch-icon:not(.no-hover):hover .top-rail,
.ai-align-stretch-icon:not(.no-hover):hover .bottom-rail {
  animation: ai-align-stretch-motion-2 700ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

@keyframes ai-align-stretch-motion-1 {
  0%,
  100% {
    transform: none;
  }
  52% {
    transform: scaleY(1.22);
  }
}

@keyframes ai-align-stretch-motion-2 {
  0%,
  100% {
    transform: none;
  }
  52% {
    transform: scaleX(1.06);
  }
}
`}</style>
      <svg
        xmlns="http://www.w3.org/2000/svg"
        className={classes}
        viewBox="0 0 15 15"
        fill="none"
      >
        <path className="top-rail" d="M1.5 1.5H13.5" stroke="currentColor" strokeWidth="1" strokeLinecap="round"/>
        <path className="bottom-rail" d="M1.5 13.5H13.5" stroke="currentColor" strokeWidth="1" strokeLinecap="round"/>
        <rect className="block" x="5.25" y="3" width="4.5" height="9" rx="0.75" stroke="currentColor" strokeWidth="1"/>
      </svg>
    </>
  );
}