Columns
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 columns --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 ColumnsIcon({ disableHover, className }: Props) {
const classes = [
"ai-columns-icon",
disableHover ? "no-hover" : "",
className ?? "",
]
.filter(Boolean)
.join(" ");
return (
<>
<style>{`
.ai-columns-icon {
width: 1em;
height: 1em;
display: inline-block;
cursor: pointer;
overflow: visible;
}
.ai-columns-icon * {
transform-box: fill-box;
}
.ai-columns-icon.no-hover * {
transform: none;
opacity: 1;
animation: none;
}
.ai-columns-icon .col {
transform-origin: center;
}
.ai-columns-icon:not(.no-hover):hover .col-1 {
animation: ai-columns-col-1 700ms ease-in-out;
}
.ai-columns-icon:not(.no-hover):hover .col-2 {
animation: ai-columns-col-2 700ms ease-in-out;
}
.ai-columns-icon:not(.no-hover):hover .col-3 {
animation: ai-columns-col-3 700ms ease-in-out;
}
.ai-columns-icon:not(.no-hover):hover .col-4 {
animation: ai-columns-col-4 700ms ease-in-out;
}
@keyframes ai-columns-col-1 {
0%, 100% { transform: translateX(0); }
50% { transform: translateX(3.5px); }
}
@keyframes ai-columns-col-2 {
0%, 100% { transform: translateX(0); }
50% { transform: translateX(1.25px); }
}
@keyframes ai-columns-col-3 {
0%, 100% { transform: translateX(0); }
50% { transform: translateX(-1.25px); }
}
@keyframes ai-columns-col-4 {
0%, 100% { transform: translateX(0); }
50% { transform: translateX(-3.5px); }
}
`}</style>
<svg
xmlns="http://www.w3.org/2000/svg"
className={classes}
viewBox="0 0 15 15"
fill="none"
>
<rect className="col col-1" x="1" y="1" width="1.5" height="13" rx="0.25" fill="currentColor"/>
<rect className="col col-2" x="4.75" y="1" width="1.5" height="13" rx="0.25" fill="currentColor"/>
<rect className="col col-3" x="8.5" y="1" width="1.5" height="13" rx="0.25" fill="currentColor"/>
<rect className="col col-4" x="12.25" y="1" width="1.5" height="13" rx="0.25" fill="currentColor"/>
</svg>
</>
);
}