Text Align Right
Install
npm install @svg-animated-icons/reactCLI
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| Flag | Description |
|---|---|
--dest <dir> | Destination directory (default: components/animated-icons) |
Or copy the component with the CLI
CLI
npx @svg-animated-icons/cli add text-align-right --reactCode
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 TextAlignRightIcon({ disableHover, className }: Props) {
const classes = [
"ai-text-align-right-icon",
disableHover ? "no-hover" : "",
className ?? "",
]
.filter(Boolean)
.join(" ");
return (
<>
<style>{`
.ai-text-align-right-icon {
width: 1em;
height: 1em;
display: inline-block;
cursor: pointer;
overflow: visible;
}
.ai-text-align-right-icon * {
transform-box: fill-box;
}
.ai-text-align-right-icon.no-hover * {
transform: none;
opacity: 1;
animation: none;
}
.ai-text-align-right-icon .line-1,
.ai-text-align-right-icon .line-2,
.ai-text-align-right-icon .line-3 {
transform-origin: right center;
}
.ai-text-align-right-icon:not(.no-hover):hover .line-1 {
animation: ai-text-align-right-pulse 700ms ease-in-out;
}
.ai-text-align-right-icon:not(.no-hover):hover .line-2 {
animation: ai-text-align-right-pulse 700ms ease-in-out 100ms;
}
.ai-text-align-right-icon:not(.no-hover):hover .line-3 {
animation: ai-text-align-right-pulse 700ms ease-in-out 200ms;
}
@keyframes ai-text-align-right-pulse {
0%, 100% { transform: scaleX(1); }
50% { transform: scaleX(0.92); }
}
`}</style>
<svg
xmlns="http://www.w3.org/2000/svg"
className={classes}
viewBox="0 0 15 15"
fill="none"
>
<path className="line-3" d="M12.5 10C12.7761 10 13 10.2239 13 10.5C13 10.7761 12.7761 11 12.5 11H4.5C4.22386 11 4 10.7761 4 10.5C4 10.2239 4.22386 10 4.5 10H12.5Z" fill="currentColor"/>
<path className="line-2" d="M12.5 7C12.7761 7 13 7.22386 13 7.5C13 7.77614 12.7761 8 12.5 8H7.5C7.22386 8 7 7.77614 7 7.5C7 7.22386 7.22386 7 7.5 7H12.5Z" fill="currentColor"/>
<path className="line-1" d="M12.5 4C12.7761 4 13 4.22386 13 4.5C13 4.77614 12.7761 5 12.5 5H2.5C2.22386 5 2 4.77614 2 4.5C2 4.22386 2.22386 4 2.5 4H12.5Z" fill="currentColor"/>
</svg>
</>
);
}