← Back

Sewing Pin

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

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

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

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

.ai-sewing-pin-icon .pin {
  transform-origin: center top;
}

.ai-sewing-pin-icon:not(.no-hover):hover .pin {
  animation: ai-sewing-pin-press 700ms ease-in-out;
}

@keyframes ai-sewing-pin-press {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(0.8px); }
}
`}</style>
      <svg
        xmlns="http://www.w3.org/2000/svg"
        className={classes}
        viewBox="0 0 15 15"
        fill="none"
      >
        <path className="pin" fillRule="evenodd" d="M7.5 1C8.88071 1 10 2.11929 10 3.5C10 4.70943 9.14105 5.71753 8 5.94922V13.5C8 13.7761 7.77614 14 7.5 14C7.22386 14 7 13.7761 7 13.5V5.94922C5.85895 5.71753 5 4.70943 5 3.5C5 2.11929 6.11929 1 7.5 1ZM7.5 2C6.67157 2 6 2.67157 6 3.5C6 4.32843 6.67157 5 7.5 5C8.32843 5 9 4.32843 9 3.5C9 2.67157 8.32843 2 7.5 2Z" fill="currentColor"/>
      </svg>
    </>
  );
}