Skip to content

Instantly share code, notes, and snippets.

@ibelick
Created February 21, 2022 11:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ibelick/0c92c1aba54c2f7e8b3a7381426ed029 to your computer and use it in GitHub Desktop.
Save ibelick/0c92c1aba54c2f7e8b3a7381426ed029 to your computer and use it in GitHub Desktop.
Circular Button with Icon (Tailwind CSS)
const IconButton = () => {
return (
<button className="inline-flex h-10 w-10 items-center justify-center rounded-full bg-gray-50 text-black drop-shadow-sm transition-colors duration-150 hover:bg-gray-200">
<svg className="h-4 w-4 fill-current" viewBox="0 0 20 20">
<path
d="M3.172 5.172a4 4 0 015.656 0L10 6.343l1.172-1.171a4 4 0 115.656 5.656L10 17.657l-6.828-6.829a4 4 0 010-5.656z"
clip-rule="evenodd"
fill-rule="evenodd"
></path>
</svg>
</button>
);
};
export default IconButton;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment