← Back

View Vertical

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

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

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

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

.ai-view-vertical-icon .left,
.ai-view-vertical-icon .right {
  transform-origin: center;
}

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

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

@keyframes ai-view-vertical-left {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(-1px); }
}

@keyframes ai-view-vertical-right {
  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"
      >
        <defs>
          <mask id="ai-view-vertical-mask">
            <rect width="15" height="15" fill="white"/>
            <path className="left" d="M1.5 2C1.22386 2 1 2.22386 1 2.5V12.5C1 12.7761 1.22386 13 1.5 13H7V2H1.5Z" fill="black"/>
            <path className="right" d="M8 13H13.5C13.7761 13 14 12.7761 14 12.5V2.5C14 2.22386 13.7761 2 13.5 2H8V13Z" fill="black"/>
          </mask>
        </defs>
        <path className="frame" d="M13.6533 1.00781C14.4097 1.08461 15 1.72334 15 2.5V12.5L14.9922 12.6533C14.9205 13.3593 14.3593 13.9205 13.6533 13.9922L13.5 14H1.5L1.34668 13.9922C0.64069 13.9205 0.0794913 13.3593 0.0078125 12.6533L0 12.5V2.5C1.51001e-07 1.72334 0.590277 1.08461 1.34668 1.00781L1.5 1H13.5L13.6533 1.00781Z" fill="currentColor" mask="url(#ai-view-vertical-mask)"/>
      </svg>
    </>
  );
}