Hover the icon or press Play. Suggested motion: turn. Pick another to preview it and update the animated code:
X icon
A free x icon from Heroicons, ready for React. Use it static or animated: both versions are below, copy-paste or one shadcn command away. Sized in em and colored by currentColor.
- License
- MIT license
- Project
- github.com
npx shadcn@latest add https://ui.cuelark.com/r/icons/heroicons/x.jsonimport * as React from "react";
/**
* X from Heroicons (https://github.com/tailwindlabs/heroicons), MIT.
* Via Cuelark UI: ui.cuelark.com/icons/heroicons/x. Sized in em, colored by currentColor.
*/
export function HiXIcon(props: React.SVGProps<SVGSVGElement>) {
return (
<svg
aria-hidden="true"
viewBox="0 0 20 20"
aria-hidden="true"
stroke="currentColor"
fill="currentColor"
strokeWidth="0"
width="1em"
height="1em"
xmlns="http://www.w3.org/2000/svg"
{...props}
>
<path
fillRule="evenodd"
d="M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z"
clipRule="evenodd"
/>
</svg>
);
}import { HiX } from "react-icons/hi";
export function Example() {
return <HiX className="size-5" />;
}<svg
viewBox="0 0 20 20"
aria-hidden="true"
stroke="currentColor"
fill="currentColor"
stroke-width="0"
width="1em"
height="1em"
xmlns="http://www.w3.org/2000/svg"
>
<path
fill-rule="evenodd"
d="M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z"
clip-rule="evenodd"
/>
</svg>"X" icon from Heroicons (https://github.com/tailwindlabs/heroicons), licensed under MIT license.