← Back

Twitter Logo

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

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

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

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

.ai-twitter-logo-icon .bird {
  transform-box: view-box;
  transform-origin: 7.5px 7.5px;
}

.ai-twitter-logo-icon:not(.no-hover):hover .bird {
  animation: ai-twitter-logo-tweet 700ms ease-in-out;
}

@keyframes ai-twitter-logo-tweet {
  0%, 100% { transform: rotate(0); }
  25% { transform: rotate(-10deg); }
  75% { transform: rotate(10deg); }
}
`}</style>
      <svg
        xmlns="http://www.w3.org/2000/svg"
        className={classes}
        viewBox="0 0 15 15"
        fill="none"
      >
        <path className="bird" d="M10.3603 1.56857C11.3726 1.56868 12.1792 2.04883 12.7217 2.74338C13.3056 2.62435 13.855 2.41008 14.3515 2.11545C14.1558 2.72714 13.7404 3.23976 13.2002 3.56467C13.2006 3.56561 13.2008 3.56665 13.2012 3.5676C13.7312 3.50361 14.2356 3.36351 14.7051 3.15549L14.7041 3.15744C14.3667 3.66272 13.9408 4.10673 13.4531 4.46994C13.4794 4.64675 13.4961 4.82424 13.4961 5.00119C13.4959 8.68736 10.6872 12.9747 5.52146 12.9748C4.0381 12.9748 2.64973 12.5673 1.45994 11.8606L1.22557 11.7151L1.14549 11.6526C0.978975 11.4903 0.943913 11.228 1.0742 11.0246C1.08745 11.004 1.10252 10.985 1.11814 10.967C1.19175 10.8454 1.31979 10.7624 1.46482 10.7502L1.55564 10.7522L1.79588 10.7756C2.62975 10.8387 3.45483 10.7158 4.19041 10.3947C3.46411 10.0737 2.88525 9.48026 2.58396 8.74435L2.50193 8.51974C2.45359 8.36869 2.48868 8.20302 2.59373 8.0842C2.59748 8.07996 2.60156 8.07558 2.60545 8.0715C1.96466 7.5076 1.55955 6.68166 1.55955 5.76096V5.72775C1.55964 5.56846 1.64397 5.41992 1.78123 5.33908C1.82689 5.31225 1.8772 5.29675 1.92771 5.28732C1.70714 4.86273 1.58104 4.38054 1.58103 3.86935C1.58104 3.4015 1.58372 2.81147 1.91307 2.28049C1.98613 2.16285 2.10507 2.09173 2.2324 2.07346C2.39179 2.022 2.5697 2.05335 2.70213 2.16135L2.77439 2.23264L3.00779 2.5051C4.08476 3.69614 5.5655 4.50969 7.23435 4.73654C7.23419 4.72321 7.23338 4.70987 7.23338 4.6965C7.23338 2.96907 8.63376 1.56861 10.3603 1.56857ZM10.3603 2.56857C9.18632 2.56861 8.23338 3.52108 8.23338 4.6965C8.23339 4.86293 8.25214 5.02527 8.28807 5.18283C8.32288 5.33548 8.28425 5.49554 8.18357 5.61545C8.10812 5.70523 8.0046 5.76455 7.89158 5.78537L7.77635 5.79318C5.7091 5.68908 3.8518 4.79824 2.49412 3.41623C2.48398 3.55192 2.48143 3.70159 2.48143 3.86935C2.48143 4.62437 2.86582 5.29116 3.45018 5.68185L3.50779 5.72775C3.6329 5.84505 3.68155 6.02618 3.62791 6.19357C3.56643 6.38484 3.38534 6.51262 3.18455 6.50607C2.97133 6.49907 2.76381 6.46843 2.56346 6.42014C2.8004 7.16641 3.42715 7.73936 4.20603 7.89572C4.41054 7.93692 4.56037 8.11398 4.56736 8.32248C4.5741 8.53102 4.43577 8.71718 4.23435 8.7717C4.05423 8.82038 3.86801 8.85105 3.67771 8.86642C4.06681 9.39585 4.68916 9.74361 5.39256 9.75607C5.58291 9.75946 5.7509 9.88225 5.8115 10.0627C5.87201 10.2432 5.81189 10.4423 5.66209 10.5598C4.95354 11.1151 4.13125 11.4529 3.27439 11.6018C3.97935 11.8428 4.73463 11.9748 5.52146 11.9748C10.0201 11.9747 12.4959 8.25734 12.4961 5.00119C12.4961 3.7126 11.5945 2.56878 10.3603 2.56857Z" fill="currentColor"/>
      </svg>
    </>
  );
}