Database
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 database --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 DatabaseIcon({ disableHover, className }: Props) {
const classes = [
"ai-database-icon",
disableHover ? "no-hover" : "",
className ?? "",
]
.filter(Boolean)
.join(" ");
return (
<>
<style>{`
.ai-database-icon {
width: 1em;
height: 1em;
display: inline-block;
cursor: pointer;
overflow: visible;
}
.ai-database-icon * {
transform-box: fill-box;
}
.ai-database-icon.no-hover * {
transform: none;
opacity: 1;
animation: none;
}
.ai-database-icon .disk-top {
transform-origin: center;
}
.ai-database-icon:not(.no-hover):hover .disk-top {
animation: ai-database-merge 700ms ease-in-out;
}
@keyframes ai-database-merge {
0%, 100% { transform: translateY(0); }
50% { transform: translateY(3.5px); }
}
`}</style>
<svg
xmlns="http://www.w3.org/2000/svg"
className={classes}
viewBox="0 0 15 15"
fill="none"
>
<g className="disk-top">
<path d="M2.5 4.5V8M12.5 4.5V8" stroke="currentColor" strokeWidth="1"/>
<path d="M2.5 4.5C2.5 5.6 4.74 6.5 7.5 6.5C10.26 6.5 12.5 5.6 12.5 4.5C12.5 3.4 10.26 2.5 7.5 2.5C4.74 2.5 2.5 3.4 2.5 4.5Z" stroke="currentColor" strokeWidth="1" strokeLinejoin="round"/>
<path d="M2.5 8C2.5 9.1 4.74 10 7.5 10C10.26 10 12.5 9.1 12.5 8" stroke="currentColor" strokeWidth="1"/>
</g>
<g className="disk-bottom">
<path d="M2.5 8V11.5M12.5 8V11.5" stroke="currentColor" strokeWidth="1"/>
<path d="M2.5 11.5C2.5 12.6 4.74 13.5 7.5 13.5C10.26 13.5 12.5 12.6 12.5 11.5" stroke="currentColor" strokeWidth="1"/>
</g>
</svg>
</>
);
}