← Back

Bell

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

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

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

.ai-bell-icon .bell,
.ai-bell-icon .clapper {
  transform-box: view-box;
  transform-origin: 7.5px 2.5px;
}

.ai-bell-icon:not(.no-hover):hover .bell,
.ai-bell-icon:not(.no-hover):hover .clapper {
  animation: ai-bell-motion-1 700ms ease-in-out;
}

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

@keyframes ai-bell-motion-1 {
  0%,
  100% {
    transform: rotate(0);
  }
  25% {
    transform: rotate(-12deg);
  }
  75% {
    transform: rotate(12deg);
  }
}
`}</style>
      <svg
        xmlns="http://www.w3.org/2000/svg"
        className={classes}
        viewBox="0 0 15 15"
        fill="none"
      >
        <path className="bell" d="M7.5 2.5C5.57 2.5 4 4.07 4 6V9.5C4 10.6 3.7 11.3 3.3 11.8H11.7C11.3 11.3 11 10.6 11 9.5V6C11 4.07 9.43 2.5 7.5 2.5Z" stroke="currentColor" strokeWidth="1" strokeLinejoin="round"/>
        <path className="top" d="M7.5 2.5V1.5" stroke="currentColor" strokeWidth="1" strokeLinecap="round"/>
        <path className="clapper" d="M6.5 12.5C6.5 13.05 6.95 13.5 7.5 13.5C8.05 13.5 8.5 13.05 8.5 12.5" stroke="currentColor" strokeWidth="1" strokeLinecap="round" strokeLinejoin="round"/>
      </svg>
    </>
  );
}