Chevron Down
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 chevron-down --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 ChevronDownIcon({ disableHover, className }: Props) {
const classes = [
"ai-chevron-down-icon",
disableHover ? "no-hover" : "",
className ?? "",
]
.filter(Boolean)
.join(" ");
return (
<>
<style>{`
.ai-chevron-down-icon {
width: 1em;
height: 1em;
display: inline-block;
cursor: pointer;
overflow: visible;
}
.ai-chevron-down-icon * {
transform-box: fill-box;
}
.ai-chevron-down-icon.no-hover * {
transform: none;
opacity: 1;
animation: none;
}
.ai-chevron-down-icon .chevron {
transform-origin: center;
}
.ai-chevron-down-icon:not(.no-hover):hover .chevron {
animation: ai-chevron-down-motion 700ms ease-in-out;
}
@keyframes ai-chevron-down-motion {
0%, 50%, 100% { transform: translate(0, 0); }
25%, 75% { transform: translateY(1.5px); }
}
`}</style>
<svg
xmlns="http://www.w3.org/2000/svg"
className={classes}
viewBox="0 0 15 15"
fill="none"
>
<path className="chevron" d="M3.5 6L7.5 10L11.5 6" stroke="currentColor" strokeWidth="1.25" strokeLinecap="round" strokeLinejoin="round"/>
</svg>
</>
);
}