Laptop
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 laptop --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 LaptopIcon({ disableHover, className }: Props) {
const classes = [
"ai-laptop-icon",
disableHover ? "no-hover" : "",
className ?? "",
]
.filter(Boolean)
.join(" ");
return (
<>
<style>{`
.ai-laptop-icon {
width: 1em;
height: 1em;
display: inline-block;
cursor: pointer;
overflow: visible;
}
.ai-laptop-icon * {
transform-box: fill-box;
}
.ai-laptop-icon.no-hover * {
transform: none;
opacity: 1;
animation: none;
}
.ai-laptop-icon .screen {
transform-box: view-box;
transform-origin: 7.5px 12px;
}
.ai-laptop-icon:not(.no-hover):hover .screen {
animation: ai-laptop-fold 700ms ease-in-out;
}
@keyframes ai-laptop-fold {
0%, 100% { transform: scaleY(1); }
50% { transform: scaleY(0); }
}
`}</style>
<svg
xmlns="http://www.w3.org/2000/svg"
className={classes}
viewBox="0 0 15 15"
fill="none"
>
<path className="base" d="M0 12H15V12.5C15 12.7761 14.7761 13 14.5 13H0.5C0.223858 13 0 12.7761 0 12.5V12Z" fill="currentColor"/>
<path className="screen" d="M12.75 3C13.4404 3 14 3.55964 14 4.25V12H1V4.25C1 3.55964 1.55964 3 2.25 3H12.75ZM2.25 4C2.11193 4 2 4.11193 2 4.25V11.5H13V4.25C13 4.11193 12.8881 4 12.75 4H2.25Z" fill="currentColor"/>
</svg>
</>
);
}