← Back

Font Roman

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

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

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

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

.ai-font-roman-icon .letter {
  transform-box: view-box;
  transform-origin: 7.5px 7.5px;
}

.ai-font-roman-icon:not(.no-hover):hover .letter {
  animation: ai-font-roman-rock 700ms ease-in-out;
}

@keyframes ai-font-roman-rock {
  0%, 100% { transform: rotate(0); }
  25% { transform: rotate(-4deg); }
  75% { transform: rotate(4deg); }
}
`}</style>
      <svg
        xmlns="http://www.w3.org/2000/svg"
        className={classes}
        viewBox="0 0 15 15"
        fill="none"
      >
        <path className="letter" d="M9.75018 3.05016C9.99862 3.05027 10.2004 3.2519 10.2004 3.50036C10.2003 3.74873 9.99856 3.95045 9.75018 3.95055H8.09979V11.0502H9.75018C9.99863 11.0503 10.2004 11.2519 10.2004 11.5004C10.2002 11.7487 9.99852 11.9495 9.75018 11.9496H5.25018C5.00176 11.9496 4.80016 11.7487 4.79999 11.5004C4.79999 11.2518 5.00165 11.0502 5.25018 11.0502H6.8996V3.95055H5.25018C5.00172 3.95055 4.80009 3.7488 4.79999 3.50036C4.79999 3.25183 5.00165 3.05016 5.25018 3.05016H9.75018Z" fill="currentColor"/>
      </svg>
    </>
  );
}