← Back

Corners

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

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

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

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

.ai-corners-icon .corner { transform-origin: center; }

.ai-corners-icon:not(.no-hover):hover .corner-tl { animation: ai-corners-tl 700ms ease-in-out; }
.ai-corners-icon:not(.no-hover):hover .corner-tr { animation: ai-corners-tr 700ms ease-in-out; }
.ai-corners-icon:not(.no-hover):hover .corner-bl { animation: ai-corners-bl 700ms ease-in-out; }
.ai-corners-icon:not(.no-hover):hover .corner-br { animation: ai-corners-br 700ms ease-in-out; }

@keyframes ai-corners-tl { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(-1.25px, -1.25px); } }
@keyframes ai-corners-tr { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(1.25px, -1.25px); } }
@keyframes ai-corners-bl { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(-1.25px, 1.25px); } }
@keyframes ai-corners-br { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(1.25px, 1.25px); } }
`}</style>
      <svg
        xmlns="http://www.w3.org/2000/svg"
        className={classes}
        viewBox="0 0 15 15"
        fill="none"
      >
        <path className="corner corner-tl" d="M5.5 3H4C3.4 3 3 3.4 3 4V5.5" stroke="currentColor" strokeWidth="1" strokeLinecap="round" strokeLinejoin="round"/>
        <path className="corner corner-tr" d="M9.5 3H11C11.6 3 12 3.4 12 4V5.5" stroke="currentColor" strokeWidth="1" strokeLinecap="round" strokeLinejoin="round"/>
        <path className="corner corner-bl" d="M5.5 12H4C3.4 12 3 11.6 3 11V9.5" stroke="currentColor" strokeWidth="1" strokeLinecap="round" strokeLinejoin="round"/>
        <path className="corner corner-br" d="M9.5 12H11C11.6 12 12 11.6 12 11V9.5" stroke="currentColor" strokeWidth="1" strokeLinecap="round" strokeLinejoin="round"/>
      </svg>
    </>
  );
}