← Back

File Text

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

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

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

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

.ai-file-text-icon .line { transform-origin: center; }

.ai-file-text-icon:not(.no-hover):hover .line {
  animation: ai-file-text-wave 700ms ease-in-out;
}

.ai-file-text-icon:not(.no-hover):hover .line-1 { animation-delay: 0ms; }
.ai-file-text-icon:not(.no-hover):hover .line-2 { animation-delay: 100ms; }
.ai-file-text-icon:not(.no-hover):hover .line-3 { animation-delay: 200ms; }

@keyframes ai-file-text-wave {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(1px); }
}
`}</style>
      <svg
        xmlns="http://www.w3.org/2000/svg"
        className={classes}
        viewBox="0 0 15 15"
        fill="none"
      >
        <path className="body" d="M9.08594 1C9.48371 1.00004 9.86522 1.15818 10.1465 1.43945L12.5605 3.85352L12.6602 3.96387C12.8788 4.23073 13 4.56606 13 4.91406V12.5C13 13.3284 12.3284 14 11.5 14H3.5C2.67157 14 2 13.3284 2 12.5V2.5C2 1.67157 2.67157 1 3.5 1H9.08594ZM3.5 2C3.22386 2 3 2.22386 3 2.5V12.5C3 12.7761 3.22386 13 3.5 13H11.5C11.7761 13 12 12.7761 12 12.5V4.91406C12 4.81464 11.9704 4.71823 11.916 4.63672L11.8535 4.56055L9.43945 2.14648C9.34572 2.05275 9.21849 2.00004 9.08594 2H3.5Z" fill="currentColor"/>
        <path className="line line-1" d="M7.5 4C7.77614 4 8 4.22386 8 4.5C8 4.77614 7.77614 5 7.5 5H4.5C4.22386 5 4 4.77614 4 4.5C4 4.22386 4.22386 4 4.5 4H7.5Z" fill="currentColor"/>
        <path className="line line-2" d="M10.5 7C10.7761 7 11 7.22386 11 7.5C11 7.77614 10.7761 8 10.5 8H4.5C4.22386 8 4 7.77614 4 7.5C4 7.22386 4.22386 7 4.5 7H10.5Z" fill="currentColor"/>
        <path className="line line-3" d="M10.5 10C10.7761 10 11 10.2239 11 10.5C11 10.7761 10.7761 11 10.5 11H4.5C4.22386 11 4 10.7761 4 10.5C4 10.2239 4.22386 10 4.5 10H10.5Z" fill="currentColor"/>
      </svg>
    </>
  );
}