← Back

Exclamation Mark

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

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

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

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

.ai-exclamation-mark-icon .excl {
  transform-origin: center;
}

.ai-exclamation-mark-icon:not(.no-hover):hover .excl {
  animation: ai-exclamation-mark-motion 700ms ease-in-out;
}

@keyframes ai-exclamation-mark-motion {
  0%, 100% { transform: translateY(0); }
  25% { transform: translateY(-1px); }
  50% { transform: translateY(0); }
  75% { transform: translateY(-1px); }
}
`}</style>
      <svg
        xmlns="http://www.w3.org/2000/svg"
        className={classes}
        viewBox="0 0 15 15"
        fill="none"
      >
        <path className="excl" d="M7.49971 10.7503C7.91393 10.7503 8.24971 11.086 8.24971 11.5003C8.24955 11.9143 7.91383 12.2503 7.49971 12.2503C7.08572 12.2501 6.74987 11.9142 6.74971 11.5003C6.74971 11.0861 7.08563 10.7504 7.49971 10.7503ZM7.48311 2.25029C8.00061 2.25054 8.41411 2.68038 8.39424 3.19756L8.20577 8.80498C8.19119 9.18285 7.8808 9.48168 7.50264 9.48174C7.12444 9.48174 6.81409 9.18288 6.79952 8.80498L6.571 3.19756C6.55111 2.68023 6.9654 2.25029 7.48311 2.25029Z" fill="currentColor"/>
      </svg>
    </>
  );
}