Calendar
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 calendar --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 CalendarIcon({ disableHover, className }: Props) {
const classes = [
"ai-calendar-icon",
disableHover ? "no-hover" : "",
className ?? "",
]
.filter(Boolean)
.join(" ");
return (
<>
<style>{`
.ai-calendar-icon {
width: 1em;
height: 1em;
display: inline-block;
cursor: pointer;
overflow: visible;
}
.ai-calendar-icon * {
transform-box: fill-box;
}
.ai-calendar-icon:not(.no-hover):hover .day {
animation: ai-calendar-motion-1 700ms ease-in-out;
}
.ai-calendar-icon:not(.no-hover):hover .day-1 { animation-delay: 0ms; }
.ai-calendar-icon:not(.no-hover):hover .day-2 { animation-delay: 80ms; }
.ai-calendar-icon:not(.no-hover):hover .day-3 { animation-delay: 160ms; }
.ai-calendar-icon:not(.no-hover):hover .day-4 { animation-delay: 240ms; }
.ai-calendar-icon:not(.no-hover):hover .day-5 { animation-delay: 320ms; }
.ai-calendar-icon:not(.no-hover):hover .day-6 { animation-delay: 400ms; }
.ai-calendar-icon.no-hover * {
transform: none;
opacity: 1;
animation: none;
}
@keyframes ai-calendar-motion-1 {
0%,
100% {
opacity: 1;
}
50% {
opacity: 0.2;
}
}
`}</style>
<svg
xmlns="http://www.w3.org/2000/svg"
className={classes}
viewBox="0 0 15 15"
fill="none"
>
<rect className="frame" x="1.5" y="2.5" width="12" height="11" rx="0.75" stroke="currentColor" strokeWidth="1"/>
<path className="rule" d="M1.5 5.5H13.5" stroke="currentColor" strokeWidth="1"/>
<path className="tab tab-l" d="M4.5 1.25V3" stroke="currentColor" strokeWidth="1" strokeLinecap="round"/>
<path className="tab tab-r" d="M10.5 1.25V3" stroke="currentColor" strokeWidth="1" strokeLinecap="round"/>
<circle className="day day-1" cx="4.5" cy="8" r="0.55" fill="currentColor"/>
<circle className="day day-2" cx="7.5" cy="8" r="0.55" fill="currentColor"/>
<circle className="day day-3" cx="10.5" cy="8" r="0.55" fill="currentColor"/>
<circle className="day day-4" cx="4.5" cy="11" r="0.55" fill="currentColor"/>
<circle className="day day-5" cx="7.5" cy="11" r="0.55" fill="currentColor"/>
<circle className="day day-6" cx="10.5" cy="11" r="0.55" fill="currentColor"/>
</svg>
</>
);
}